Wed Jan 5 20:32:38 PST 2005
- Previous message: [Slony1-general] execute script
- Next message: [Slony1-general] Privilege separation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In slon.env, $TABLE_ID can be set to a particular starting point, in order to avoid having tables with duplicate IDs, but there's no such equivalent for sequences. These two patches add a $SEQUENCE_ID to resolve this problem. Thanks, Steve Simms PS: Please let me know if I should be sending these patches somewhere other than the list. -- Steve Simms <steve at deefs.net> http://www.deefs.net -------------- next part -------------- Index: slon.env =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/slon.env,v retrieving revision 1.6 diff -u -3 -r1.6 slon.env --- slon.env 1 Oct 2004 20:42:59 -0000 1.6 +++ slon.env 5 Jan 2005 20:26:37 -0000 @@ -37,8 +37,10 @@ require $ENV{"SLONYSET"}; } else { - # Table Numbering - controlled here... + # Table and Sequence Numbering - controlled here... $TABLE_ID=1; + $SEQUENCE_ID=1; + # These are the tables that already have primary keys, that therefore do # not need for Slony-I to add sequences/indices @PKEYEDTABLES=( -------------- next part -------------- Index: create_set.pl =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/create_set.pl,v retrieving revision 1.8 diff -u -3 -r1.8 create_set.pl --- create_set.pl 19 Nov 2004 23:35:57 -0000 1.8 +++ create_set.pl 5 Jan 2005 20:26:51 -0000 @@ -77,14 +77,16 @@ echo 'Adding sequences to the subscription set'; "; -$SEQID=1; +if ($SEQUENCE_ID < 1) { + $SEQUENCE_ID = 1; +} foreach my $seq (@SEQUENCES) { $seq = ensure_namespace($seq); print OUTFILE " - set add sequence (set id = $set, origin = $MASTERNODE, id = $SEQID, full qualified name = '$seq', comment = 'Sequence $seq'); + set add sequence (set id = $set, origin = $MASTERNODE, id = $SEQUENCE_ID, full qualified name = '$seq', comment = 'Sequence $seq'); echo 'Add sequence $seq'; "; - $SEQID++; + $SEQUENCE_ID++; } print OUTFILE " echo 'All tables added';
- Previous message: [Slony1-general] execute script
- Next message: [Slony1-general] Privilege separation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list