[PATCHES] contrib/dbmirror
Attached is a 1 line bug fix for dbmirror that was submitted. It fixes a bug where some transactions could be dropped when writing mirrored SQL statements to files. -- Steven Singer [EMAIL PROTECTED] Dispatch SystemsPhone: 519-747-1170 ext 282 Navtech Systems Support Inc.AFTN: CYYZXNSX SITA: YYZNSCR Waterloo, Ontario ARINC: YKFNSCR Index: DBMirror.pl === RCS file: /projects/cvsroot/pgsql-server/contrib/dbmirror/DBMirror.pl,v retrieving revision 1.9 diff -u -r1.9 DBMirror.pl --- DBMirror.pl 22 Apr 2004 03:48:38 - 1.9 +++ DBMirror.pl 1 Jul 2004 01:31:27 - @@ -249,6 +249,8 @@ if($::slaveInfo-{'status'} eq 'FileOpen') { close ($::slaveInfo-{'TransactionFile'}); + $::slaveInfo-{status} = 'FileClosed'; + } elsif($::slaveInfo-{'status'} eq 'DBOpen') { ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[PATCHES] contrib/dbmirror typo fix
Please apply this minor patch to the cvs HEAD of dbmirror It fixes a typo in a define Thanks -- Steven Singer [EMAIL PROTECTED] Dispatch SystemsPhone: 519-747-1170 ext 282 Navtech Systems Support Inc.AFTN: CYYZXNSX SITA: YYZNSCR Waterloo, Ontario ARINC: YKFNSCR Index: pending.c === RCS file: /projects/cvsroot/pgsql-server/contrib/dbmirror/pending.c,v retrieving revision 1.17 diff -u -r1.17 pending.c --- pending.c 22 Apr 2004 03:48:38 - 1.17 +++ pending.c 24 May 2004 16:30:38 - @@ -76,7 +76,7 @@ #else #define debug_msg2(x,y) #define debug_msg(x) -#define debug_msg(x,y,z) +#define debug_msg3(x,y,z) #endif ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [PATCHES] contrib/dbmirror
On Wed, 21 Apr 2004, Bruce Momjian wrote: Patch applied. Thanks. Should this be backpatched to 7.4.X? The patch didn't apply cleanly to that CVS branch. No. support for sequences was only introduced onto the 7.5 tree/head. Same with the support for transaction files. --- [EMAIL PROTECTED] wrote: Attached is are a few small fixes for dbmirror. 1. Fixed bug where sequences were being mirrored incorrectly if they exceeded 127 2. Fixed a bug in the perl script with mirroring sequences(John Burtenshaw sent an email to patches describing the bug in March but I htink he forgot to attach his patch) 3. The dates/times in the transaction files will always use 2 digits. -- Steven Singer [EMAIL PROTECTED] Dispatch SystemsPhone: 519-747-1170 ext 282 Navtech Systems Support Inc.AFTN: CYYZXNSX SITA: YYZNSCR Waterloo, Ontario ARINC: YKFNSCR Content-Description: [ Attachment, skipping... ] ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html -- Steven Singer [EMAIL PROTECTED] Dispatch SystemsPhone: 519-747-1170 ext 282 Navtech Systems Support Inc.AFTN: CYYZXNSX SITA: YYZNSCR Waterloo, Ontario ARINC: YKFNSCR ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
[PATCHES] contrib/dbmirror
Attached is are a few small fixes for dbmirror. 1. Fixed bug where sequences were being mirrored incorrectly if they exceeded 127 2. Fixed a bug in the perl script with mirroring sequences(John Burtenshaw sent an email to patches describing the bug in March but I htink he forgot to attach his patch) 3. The dates/times in the transaction files will always use 2 digits. -- Steven Singer [EMAIL PROTECTED] Dispatch SystemsPhone: 519-747-1170 ext 282 Navtech Systems Support Inc.AFTN: CYYZXNSX SITA: YYZNSCR Waterloo, Ontario ARINC: YKFNSCR Index: pending.c === RCS file: /projects/cvsroot/pgsql-server/contrib/dbmirror/pending.c,v retrieving revision 1.16 diff -u -w -r1.16 pending.c --- pending.c 17 Feb 2004 03:34:35 - 1.16 +++ pending.c 18 Apr 2004 15:31:14 - @@ -701,7 +701,7 @@ debug_msg(dbmirror:nextval Set resTuple); - nextSequenceValue =*(DatumGetPointer(SPI_getbinval(resTuple, + nextSequenceValue =* (unsigned int *)(DatumGetPointer(SPI_getbinval(resTuple, SPI_tuptable-tupdesc, 1,isNull))); Index: DBMirror.pl === RCS file: /projects/cvsroot/pgsql-server/contrib/dbmirror/DBMirror.pl,v retrieving revision 1.8 diff -u -w -r1.8 DBMirror.pl --- DBMirror.pl 17 Feb 2004 03:34:35 - 1.8 +++ DBMirror.pl 18 Apr 2004 15:31:14 - @@ -660,7 +660,7 @@ my $query; my $sequenceValue = $pendingResult-getvalue($currentTuple,4); -$query = sprintf(select setval(%s,%s),$sequenceName,$sequenceValue); +$query = sprintf(select setval('%s',%s),$sequenceName,$sequenceValue); sendQueryToSlaves($transId,$query); return $currentTuple; @@ -960,7 +960,7 @@ my $nowisdst; ($nowsec,$nowmin,$nowhour,$nowmday,$nowmon,$nowyear,$nowwday,$nowyday,$nowisdst) = localtime; -my $fileName=sprintf(%s/%s_%d-%d-%d_%d:%d:%dXID%d.sql, $::slaveInfo-{'TransactionFileDirectory'}, +my $fileName=sprintf(%s/%s_%02d-%02d-%02d_%02d:%02d:%dXID%d.sql, $::slaveInfo-{'TransactionFileDirectory'}, $::slaveInfo-{MirrorHostId},($nowyear+1900),($nowmon+1),$nowmday,$nowhour,$nowmin, $nowsec,$XID); ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html