Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita4d9d3e

Browse files
committed
Attached is are a few small fixes for dbmirror.
1. Fixed bug where sequences were being mirrored incorrectly if theyexceeded 1272. Fixed a bug in the perl script with mirroring sequences(JohnBurtenshaw sent an email to patches describing the bug in March but Ihtink he forgot to attach his patch)3. The dates/times in the transaction files will always use 2 digits.Steven Singer
1 parent914042f commita4d9d3e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎contrib/dbmirror/DBMirror.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#
3434
#
3535
##############################################################################
36-
# $PostgreSQL: pgsql/contrib/dbmirror/DBMirror.pl,v 1.8 2004/02/17 03:34:35 momjian Exp $
36+
# $PostgreSQL: pgsql/contrib/dbmirror/DBMirror.pl,v 1.9 2004/04/22 03:48:38 momjian Exp $
3737
#
3838
##############################################################################
3939

@@ -660,7 +660,7 @@ ($$$$$)
660660

661661
my$query;
662662
my$sequenceValue =$pendingResult->getvalue($currentTuple,4);
663-
$query =sprintf("select setval(%s,%s)",$sequenceName,$sequenceValue);
663+
$query =sprintf("select setval('%s',%s)",$sequenceName,$sequenceValue);
664664

665665
sendQueryToSlaves($transId,$query);
666666
return$currentTuple;
@@ -960,7 +960,7 @@ ($$)
960960
my$nowisdst;
961961
($nowsec,$nowmin,$nowhour,$nowmday,$nowmon,$nowyear,$nowwday,$nowyday,$nowisdst) =
962962
localtime;
963-
my$fileName=sprintf(">%s/%s_%d-%d-%d_%d:%d:%dXID%d.sql",$::slaveInfo->{'TransactionFileDirectory'},
963+
my$fileName=sprintf(">%s/%s_%02d-%02d-%02d_%02d:%02d:%dXID%d.sql",$::slaveInfo->{'TransactionFileDirectory'},
964964
$::slaveInfo->{"MirrorHostId"},($nowyear+1900),($nowmon+1),$nowmday,$nowhour,$nowmin,
965965
$nowsec,$XID);
966966

‎contrib/dbmirror/pending.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/****************************************************************************
22
* pending.c
3-
* $Id: pending.c,v 1.16 2004/02/17 03:34:35 momjian Exp $
4-
* $PostgreSQL: pgsql/contrib/dbmirror/pending.c,v 1.16 2004/02/17 03:34:35 momjian Exp $
3+
* $Id: pending.c,v 1.17 2004/04/22 03:48:38 momjian Exp $
4+
* $PostgreSQL: pgsql/contrib/dbmirror/pending.c,v 1.17 2004/04/22 03:48:38 momjian Exp $
55
*
66
* This file contains a trigger for Postgresql-7.x to record changes to tables
77
* to a pending table for mirroring.
@@ -701,7 +701,7 @@ nextval(PG_FUNCTION_ARGS)
701701

702702
debug_msg("dbmirror:nextval Set resTuple");
703703

704-
nextSequenceValue=*(DatumGetPointer(SPI_getbinval(resTuple,
704+
nextSequenceValue=* (unsignedint*)(DatumGetPointer(SPI_getbinval(resTuple,
705705
SPI_tuptable->tupdesc,
706706
1,&isNull)));
707707

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp