Home > Archive > PostgreSQL Bugs > May 2005 > BUG #1691: Bug in DBMirror









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author BUG #1691: Bug in DBMirror
Yury Don

2005-05-31, 11:24 am


The following bug has been logged online:

Bug reference: 1691
Logged by: Yury Don
Email address: yura@vpcit.ru
PostgreSQL version: 8.0.3
Operating system: Linux (Debian)
Description: Bug in DBMirror
Details:

DBMirror doesn't mirror changes in sequences.
I've executed query
select nextval('public."demand_id_seq"')
on master database and when run DBMirror.pl, I got an error

Error sending query 411241 to db
select setval('public."demand_id_seq"',2) at ./DBMirror.pl line 771.

I suppose an error is in function sendQueryToSlaves - resultStatus compares
only with PGRES_COMMAND_OK but query like "select setval(...)"
returns tuples, so it must be compared with PGRES_TUPLES_OK
I've changed line 699 in DBMirror.pl from
unless($queryResult->resultStatus == PGRES_COMMAND_OK) {
to
unless($queryResult->resultStatus == PGRES_COMMAND_OK or
$queryResult->resultStatus == PGRES_TUPLES_OK) {
and now dbmirror works fine

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com