[Pgpool-general] Problems with using pgpool with deferred constraints

Michael Musenbrock redeamer at gmx.net
Wed Nov 9 21:42:47 UTC 2011


Hi,

we are using pgool in master/slave mode (slony (3 backends)) and
activated load balancing.
The database in the background heavily uses initially deferred
constraints. This circumstance
leads to 'kind mismatch among backend' errors, on commit, if a
constraint is violated.

Why that?!
Transaction statements (eg. begin, commit) are executed on all backends,
which is basically fine.
Then an eg. update stmt is executed (on master node only of course)
which triggers an
constraint violation. The Constraints is deferred, so no error yet.
At the end of the transaction, the commit statement is again executed on
all backends,
on the master node it fails (constraints violation) and on the slave
nodes it, of course,
is successful. 1 Failure / 2 success leads to the kind mismatch error,
even if there is none.

That would in general make not much difference, data integrity is fine,
an error was thrown,
but we rely on the original error message, which gets wrapped by the
pgpool error.

Do you know of any solution? Would it be just fine to execute the
transaction statements only
on the master db, or would that hinder select load balancing on the
slave nodes?

Regards,
Michael


More information about the Pgpool-general mailing list