Mon Feb 13 06:57:19 PST 2006
- Previous message: [Slony1-general] Replicating pg_users
- Next message: [Slony1-general] Replicating pg_users
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hannu Krosing <hannu at skype.net> writes: > ??hel kenal p??eval, E, 2006-02-13 kell 08:34, kirjutas Christopher > Browne: >> Hannu Krosing <hannu at skype.net> writes: >> > ??hel kenal p????eval, E, 2006-02-13 kell 11:36, kirjutas Kevin Gill: >> >> Is there a method for replicating the database users (pg_users)? >> > >> > pg_user is a VIEW and as such you will probably not be able to >> > replicate it. >> > >> > You could try to replicate the underlying table (pg_shadow), though >> > I'm not sure if slony allows you to do it. >> >> The trouble with trying to replicate system tables is that you can't >> put triggers on them, which is what Slony-I requires... > > perhaps it can be done by having a user table mirror pg_shadow, via some > regular script, and then replicate that. > > then the failover process would need to do "begin; delete from > pg_shadow; insert into pg_shadow select * from > replicated_pg_shadow;commit;" to have a fresh copy Yes, I guess that would work. A way to do this that would be, oh, call it "forcibly robust" would be for each SYNC to check to see if pg_shadow had changed, and update the user table correspondingly. In practice, it's probably good enough to have some script that runs every so often to look for changes. I know we don't modify pg_shadow on our systems so often as every week; polling for it once a day would likely suffice, for us... -- "cbbrowne","@","ca.afilias.info" <http://dba2.int.libertyrms.com/> Christopher Browne (416) 673-4124 (land)
- Previous message: [Slony1-general] Replicating pg_users
- Next message: [Slony1-general] Replicating pg_users
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list