postgres replication with sequences - Mailing list pgadmin-support

From Talvinder Matharu
Subject postgres replication with sequences
Date
Msg-id BOEOJAIGPHEHHCGGIBFCIEPKDFAA.talvinder.matharu@ingenta.com
Whole thread Raw
List pgadmin-support
Hi,

I have noticed that there is a bug with replicating sequences using
DBMirror.pl.  In the method sendQueryToSlaves there is a test for
PGRES_COMMAND_OK, which applies to INSERTS/UPDATES.  However, when trying to
update the sequence, you set the value by using a select "SELECT setval..."
and so the value set does not equal to PGRES_COMMAND_OK but should be tested
against PGRES_TUPLES_OK.  If you fail to do this test then sequences will
fail to be removed from the pending list within the database and as a result
there will be a queue.

Hope this is useful info.

Cheers,

Talvinder



pgadmin-support by date:

Previous
From: Laramie Crocker
Date:
Subject: pgAdmin III won't connect over ssh tunnel
Next
From: Vegard Pettersen
Date:
Subject: Black is beautifull