Alan Hodgson ahodgson
Sun Jul 25 20:17:47 PDT 2004
On Mon, Jul 26, 2004 at 01:29:41AM +0530, mallah at trade-india.com wrote:
> I am looking for  setting up a slave database to my production one without
> much maintainence overhead. by that i mean  whatever i do to my master gets
> replicated to the slave (asynchronously)   these includes table drops ,
> addition of tables and altering of existing table schemas. Is such a thing
> possible with slony1 or any other (asynchronous) postgresql replication
> system currently?

Slony will not handle schema changes transparently.  You must execute
schema update scripts via the provided tools.  You definitely cannot add
or drop tables without using the Slony tools to do so - Slony is configured
at the table level, and each table to be replicated must be configured
as part of a replication set.

The DBA must know what is replicated and what isn't and handle schema updates
appropriately.

I've looked at the other replication options for PostgreSQL and none of the
others handle these issues any better.  The commercial option can't even do any
schema changes without requiring a complete re-replication of all data in the
affected tables, which ruled it out for our use.  Erserver handles schema
changes much the same way Slony does (with less protection), and it has other
limitations that make it less desirable to use.

In short, Slony is currently the best there is for PostgreSQL (IMO), especially
if you need to do frequent schema changes and if your replication target is in
active use.

> 
> Also can anyone point me to the instructions for settingup slony1 on
> databases having  large number of tables wherein the dba does not know which
> ones have pkeys and which one does not have.

Configuration at this time is pretty much manual, unless the provided
configuration script can handle your needs.  It's not that bad, I got a 6-node
cluster setup without any issues just from looking at the sample scripts.
Large numbers of tables would make it more complex but not much - most of the
work was getting all the path and listener setups right for that many nodes
(much of which I'm no longer sure is required, but it works, so wth).

It sounds like there are people working on various configuration tools that
will make all this simpler as time goes on. 

-- 
"When Government fears the people, it's liberty. When people fear the
Government, it's tyranny." -- Benjamin Franklin



More information about the Slony1-general mailing list