pullback diagram & connected, irreducible or reduced schemes Let $X, Y,Z$ schemes with maps $f:X \to Z, g:Y \to Z$. we take a look at the 'pullback' diagram
$\require{AMScd}$
\begin{CD}
Y \times_Z X @>p_X>> X\\
@Vp_YVV @VVfV\\
Y @>g >> Z
\end{CD}
we assume that $f$ is open, closed & surjective map and $p_Y$ is surjective and closed, and additionally $Y \times_Z X, Y$ and $Z$ have property K. K is $\{$connected, irreducible or reduced$\}$.
Q: is that true & what is the argument that $X$ is also K. 
nota bene: this is a generalisation of problem, I faced previously. therefore the claim with K$ \text{ }\sim$ connected is true, even though I haven't found an argument. any hint? while the K$ \text{ }\sim$ reduced is a local problem that can be treated locally, i.e. all schemes might be assumed as affine and the problem reduces to the situation $R, A, S$ rings and $A, R, A \otimes_R S$ reduced. is $S$ reduced. this shall be true, since if $S$ nor reduced, it would contain a non zero nilpotent $s \in S$, i.e. $s^n=0$ for $n$ big enough. choose $a \in A$ with $a \otimes s \neq 0$. is this always possible? if yes, we obtain the contradiction, since this would imply that  $a \otimes s$ is a non trivial nilpotent of a reduced ring. does it work?
the cases K connected or irreducible don't know.
 A: For reduced, this is not true. Let $X=\operatorname{Spec} k[x,y]/(xy,y^2)$, $Y=\operatorname{Spec} k[x]/(x-1)$, and $Z=\operatorname{Spec} k[x]$ with the obvious maps. Then $X$ is not reduced, but $Y$, $Z$, and $X\times_Z Y = \operatorname{Spec} k[x,y]/(x-1,xy,y^2) = \operatorname{Spec} k[y]/(y)$ are all reduced.
For irreducible, this is not true. Let $X=\operatorname{Spec} k[x,y]/(x^2-y^2)$, $Y=\operatorname{Spec} k[x]/(x)$, and $Z=\operatorname{Spec} k[x]$ with the obvious maps. Then $X$ is not irreducible, but $Y$, $Z$, and $X\times_Z Y = \operatorname{Spec} k[x,y]/(x,x^2-y^2)=\operatorname{Spec} k[y]/(y^2)$ are. 
For connectedness, the answer is yes. We show that if $X$ is disconnected then $X\times_Z Y$ must also be disconnected. 
Proof: Consider a decomposition $X=X_1\sqcup \cdots \sqcup X_n$ in to connected components. As $X_i\to X$ is a closed+open immersion and closed+open immersions are stable under arbitrary base change, $X_i\times_Z Y \to X\times_Z Y$ is again a closed + open immersion. Since the images of these are nonempty and do not intersect (this is where we use the conditions on $f$), they represent distinct connected components of $X\times_ZY$.
