On 10/9/2006 8:48 PM, Michael wrote: > Hi, > > I’ve been going through the tutorial for Replicating Your First Database > and I have a few questions before I touch our production database.
If you don't have a test environment that's a more or less exact copy of your production system, there has never been a better time to build one than right now. > > 1) in the set add table part of the first script, is there a way > for me to determine in postgres, which of the tables in a db ( that I > didn’t design) that do not have a primary key (sort of like the history > table in the example) before I run this script. I don’t want to have to > trip over an error each time, I’d like to pre-empt this with a key = serial. The serial keys added by slony are considered a design flaw to begin with. Do not use that feature. Make sure that all your tables have a primary key before you start working with slony on that database. > 2) in the third script (the one that validates that the replicated > db is the same as the master), should I include sequences as well as > tables for this comparison? You can do that. Keep in mind however that gaps in sequences are ok. So as long as you find a replica to be ahead (can happen in crash and failover scenarios with actual loss of committed transactions), this is still in accordance with PostgreSQL's semantics of sequences. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== [EMAIL PROTECTED] # _______________________________________________ Slony1-general mailing list [email protected] http://gborg.postgresql.org/mailman/listinfo/slony1-general
