Andrew Sullivan ajs at crankycanuck.ca
Wed Nov 28 07:37:38 PST 2007
On Tue, Nov 27, 2007 at 04:08:05PM -0500, Robert Landrum wrote:
> We have several hundred tables in our DB and all should be replicated. 
> 
>     SELECT
>       relname
>     FROM
>       pg_class
>     WHERE
>       relkind = 'r' and
>       relhaspkey is true and
>       relowner = (select usesysid from pg_user where usename = 'foobar')
>     ORDER BY
>       relname
> 
> A similar query is set to be run for sequences.  I have only sequences 
> and pkey'd tables.

This will get you the tables, yes.  But it'd be nicer to write a script that
automatically updates your Slony config at the same time as your schema is
altered.  This way, you can use your source control to support both your
operations and coding. 

You will find your life goes a lot easier if you assume that replication is
one of the features of your DBMS, and is to be worked with; rather than a
sort of add-on that happens to live in there.  This approach will also make
your planning for schema changes a little less painful.

A

-- 
Andrew Sullivan
Old sigs will return after re-constitution of blue smoke


More information about the Slony1-general mailing list