Sweta Mulgavker sweta.mulgavker at gmail.com
Sun Aug 9 23:46:23 PDT 2009
Hello all,



>
>>
>> >> You always need to add the sequences explicitly.  No if, and, or but.
>>
>
I have a table leave_type for which I have given a primary key 'serial'
which is an auto increment column.  The sequence for this table was created
by postgres when the column was created (I had altered the table as it did
not have any primary key ).  I have only added  the table name in my conf
file. But the schema of my db , both on master and slave is same. (same
number of tables and sequences). I have not added any sequence in the conf
file. I tried replicating the table and it works fine :) . But because of
not adding the sequence  in my conf file the  sequence on my slave is not
getting  replicated / updated .

My conclusion is that -->

If we want to replicate only tables in the db we dont need to add the name
of the sequence.
But in case if the master fails and we have to take a dump from the slave n
restore on master then the sequences will not have the correct values ...
Hence it is a safer option to replicate sequences too.

But if one does not wish to replicate the sequence they can leave it as data
in the tables is  getting replicated anyway :)


P.S - Correct me if I am wrong. :)

 Regards,
Sweta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20090810/=
593357fa/attachment.htm


More information about the Slony1-general mailing list