Consider the following pullback diagram (in any category):
$$ \newcommand{\ra}[1]{\kern-1.5ex\xrightarrow{\ \ #1\ \ }\phantom{}\kern-1.5ex} \newcommand{\ras}[1]{\kern-1.5ex\xrightarrow{\ \ \smash{#1}\ \ }\phantom{}\kern-1.5ex} \newcommand{\da}[1]{\bigg\downarrow\raise.5ex\rlap{\scriptstyle#1}} \begin{array}{c} A \times_C B & \ra{p} & A \\ \da{q} & & \da{a} \\ B & \ras{b} & C \\ \end{array} $$
with $a$ a monomorphism and $b$ an epimorphism. I would like to understand necessary and/or sufficient conditions for $p$ to be an epimorphism too.
The following might be relevant:
Lemma: $q$ is always a monomorphism (and dually, in all pushout diagrams, the same statement holds for the epimorphism)
Proof: Assume that we have two maps $u_1, u_2$ from some object $W$ to $A \times_C B$ such that $q \circ u_1 = q \circ u_2$. Then $a \circ p \circ u_1 = a \circ p \circ u_2$ because the diagram is Cartesian, and therefore $p \circ u_1 = p \circ u_2$ because $a$ in a monomorphism. But since $u_1$ and $u_2$ are uniquely determined by their compositions $p \circ u_i$ and $q \circ u_i$, and since both coincide, we have that $u_1 = u_2$, and therefore $q$ is a monomorphism. QED
I have read here a proof for Abelian categories, but I think that my proof should be ok for any category, am I wrong? Anyway, back to the main point:
Question: When is $p$ an epimorphism too?
I don't expect this to be always true. But maybe there are necessary and/or sufficient conditions for when this works. For instance, for Sets it is always true (just look at the explicit construction of the pullback).
PS: I have seen here that it is true in any Abelian category.

