> Hello. I'm using pgpool-II with 2 backend servers.
> In one maintenance routine, we get the following error:
> 
> ERROR:  pgpool detected difference of the number of update tuples
> HINT:  check data consistency between master and other db node
> 
> After debugging, the query in question was "UPDATE
> afiliado.clique_afiliado SET cache=true WHERE
> id_clique_afiliado=55809586;". This ID in question is a serial column.
> I checked it on both backends, and that row is present on one, but not
> on the other. We always run our queries through the pooler.
> Is there any reason why an insert would succeed in one backend but
> fail on the other?
> Is there a way to avoid this behaviour?

You need to lock the table while inserting a raw including SERIAL
column. You could either issue an explicit lock command or
"insert_lock = true" in your pgpoo.conf.

You could use /*INSERT LOCK*/ and /NO INSERT LOCK*/ if you like.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
_______________________________________________
Pgpool-general mailing list
Pgpool-general@pgfoundry.org
http://pgfoundry.org/mailman/listinfo/pgpool-general

Reply via email to