TITLE: Is being a coequalizer a target-local property in schemes? (answered: no, and no)
QUESTION [5 upvotes]: This question is aimed at a better understanding of GIT's "categorical quotients", which are defined as coequalizers of group actions $G\times X\rightrightarrows X$ in the category of schemes.  See also Anton's currently unanswered question about surjectivity of coequalizers, also answered by Laurent Moret-Bailly.
Suppose $f,g:W\rightrightarrows X$ and $h:X\to Y$ are scheme maps such that $hf=hg$.  Let $Y_i$ be a Zariksi cover of $Y$, and let $X_i$ and $W_i$ be their pullbacks to $Y_i$ (i.e. the preimages of the open sets $Y_i$).

 (a) local to global:  Is it true that if $W_i\rightrightarrows X_i\to Y_i$ is a coequalizer in the category of schemes for every $i$, then $Y$ is a coequalizer in schemes?
 (b) global to local:  How about the converse?

Summary of answer by Laurent Moret-Bailly:
(a) local to global: answer is no, but yes if the maps on intersections $h_{ij}:X_{ij}\to Y_{ij}$ are epic (for example if $h$ is schematically surjective, or just universally epic).
(b) global to local: answer is simply no.
Remarks
1) The analogous statements (a) and (b) for coequalizers in the category of locally ringed spaces are true, which can be seen from the construction of coequalizers in LRS (coequalize the topological spaces, and take rings of invariants).
2)  The analogous statements for coequalizers in the category of affine schemes is true: That $C\to B\rightrightarrows A$ is an equalizer is equivalent to the exactness of the $C$-module sequence $0\to C \to B \stackrel{f-g}{\to} A \to 0$, which can be checked in the localizations at prime (or maximal) ideals of $C$.
3)  The analogous statements for good geometric quotients of schemes is true.  That is, working in Schemes/$S$, if we take $W=G\times_S X$, then $X\to Y$ is a good geometric quotient iff $Y_i$ is a good geometric quotient of $W_i\rightrightarrows X_i$ for all $i$.
4) The analogous statements for equalizers of schemes is true, because fibred products can be checked/constructed on open covers, as is essentially proved in Hartshorne chapter II.3.  In fact in any category, pulling back along a morphism preserves all limits, but not colimits, and in particular not coequalizers.
5) If $W=Spec(A),X=Spec(B)$ and $Y$ is their scheme coequalizer, then $Y$ is usually not affine (e.g. when gluing along opens), but $Spec(\cal{O}_Y(Y))$ is the coequalizer in the category of affine schemes.  That is, $\cal{O}_Y(Y)$ is canonically isomorphic to the equalizer $C$ of $f^\sharp, g^\sharp:B\rightrightarrows A$ in rings, whose underlying set is the equalizer in sets.
6) If in (5) $B$ is a local ring, then $Y$ is affine, $Y=Spec(C)$, $C$ is local, and $C\to A$ is a local map.

REPLY [7 votes]: Let me start with a remark [EDITED for clarity after Andrew's comments]. Given $h:X\to Y$, the following are equivalent:
(1) $h$ is the coequalizer of some $W\rightrightarrows X$,
(2) $h$ is the coequalizer of $X\times_Y X\rightrightarrows X$.
In other words, being a coequalizer is equivalent to being an effective epimorphism (This works in any category with fiber products).
Back to the questions. Question (b) asks whether if $h$ is a coequalizer, then its restriction $h^{-1}(V)\to V$ also is, for each open $V\subset Y$. Let me recall the example I gave to answer this question, which provides a counterexample where $h^{-1}(V)$ is empty (and $V$ isn't): take $Y=\mathrm{Spec}\,k[[t]]$ ($k$ a field),  $X=$ the disjoint sum of all subschemes $\mathrm{Spec}\,(k[[t]]/(t^n))$ ($n\geq1$), $V=$ generic point of $Y$.
For question (a), assume each $h_i:X_i\to Y_i$ is a coequalizer and let $s:X\to S$ be a morphism such that $sf=sg$. Then for each $i$, the restriction of $s$ to $X_i$ descends uniquely to $t_i:Y_i\to S$. The question is whether $t_i$ and $t_j$ coincide on $Y_i\cap Y_j$. Composing them with (the restriction of) $f$ (or $g$) gives the same result, hence:
$\bullet$ gluing is automatic (and we get a positive answer) if we know that for each open $V\subset Y$, the restriction $h^{-1}(V)\to V$ is an epimorphism of schemes;
$\bullet$ but the above example shows that this is not true in general, and in fact we get a (nonseparated) counterexample to the question by taking two copies $X_i\to Y_i$ ($i=1,2$) of that example and putting $X=X_1\coprod X_2$, $Y=$ gluing of $Y_1$ and $Y_2$ along the generic points: here the coequalizer of $X\times_Y X\rightrightarrows X$ is $Y_1\coprod Y_2$.