Christopher Browne cbbrowne at ca.afilias.info
Tue Dec 11 13:55:50 PST 2007
<postgres at dac.e4ward.com> writes:
> I have a master node with a database and tables owned by user1 (not
> superuser). Our apps use that same user to connect to the database.
>
> Following slony's documentation I created a new "slony" superuser so
> slons connect to the nodes as that user. I've done schema migrations
> using the slonik execute script without specifying ownerships. So all
> my replicated tables on the slave are owned by the slony user.
>
> When I want to do a switch/failover the apps can't use the replicated
> tables because of permission issues.
>
> I'd like to know if you can suggest me some "best practice" regarding
> this simple case. If I can avoid having to include special ownership
> changes on the execute scripts, much better.

We've normally handled creation of new tables via submitting them via
psql to each node.

When those tables are new, and are not connected to replication yet,
there's not forcibly a need to go through the whole rigorous locking
process that EXECUTE SCRIPT goes to in order to get them into place.
-- 
(reverse (concatenate 'string "moc.enworbbc" "@" "enworbbc"))
http://linuxdatabases.info/info/x.html
Rules   of the Evil   Overlord  #101. "I  will   not order my  trusted
lieutenant to kill the infant who is  destined to overthrow me -- I'll
do it myself." <http://www.eviloverlord.com/>


More information about the Slony1-general mailing list