Unix Technical Forum

BUG #1691: Bug in DBMirror

This is a discussion on BUG #1691: Bug in DBMirror within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 1691 Logged by: Yury Don Email address: yura@vpcit.ru PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 09:53 AM
Yury Don
 
Posts: n/a
Default BUG #1691: Bug in DBMirror


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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:20 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com