Tue Oct 19 18:49:49 PDT 2004
- Previous message: [Slony1-general] Feature request for DDL statement replication
- Next message: [Slony1-general] Number of connections to master/slave
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ed L. wrote: | On Tuesday October 19 2004 11:06, Darcy Buskermolen wrote: | |>Have a look for the execute script command in slonik | | | Sweet! | | % cat replicate_ddl.sh | slonik <<_EOF_ | cluster name = $CLUSTERNAME; | node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST | port=$MASTERPORT user=$MASTERDBA'; | execute script ( set id=1, FILENAME = './schemachange.sql', EVENT NODE = | 1 ); | _EOF_ | | % cat schemachange.sql | alter table branches add column bar integer; | | Not the first time I've requested a feature that already existed! I'd say | this definitely deserves more prominent documentation, as this is a big | win. Are there any concerns about this functionality? Any known gotchas? 1. Thou Shalt Not Use BEGIN Or COMMIT In Thy DDL Scripts, as if thou shouldst do so, thine script shall be smitten and stricken, as shalt be all thine Slony-I nodes. 2. Thou shalt not have any other errors in thine scripts, lest Slony-I visit pain and pestilence on thy nodes. :-). EXECUTE SCRIPT does _not_ play well with scripts that are generated in any sort of "cavalier" fashion. If the script fails, on a node, the slon will panic and abort. This is actually the _right_ answer; what you need to do is to fix that node so that it is in a state where the DDL will work, and restart the slon. If slon "passed over" the change, and continued, you'd be left in the situation where DDL _necessary_ for doing further updates wouldn't have been applied. "Pain and pestilence" is a good way to describe what could happen next... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBdVO4CVn6LJfHIAIRAoIlAKDPtep36rHNjh7h7BFHFTM2s1byAwCg1yrc KB5517koap8ywxOgARP123s= =Kr2c -----END PGP SIGNATURE-----
- Previous message: [Slony1-general] Feature request for DDL statement replication
- Next message: [Slony1-general] Number of connections to master/slave
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list