Tue Feb 7 07:06:46 PST 2006
- Previous message: [Slony1-general] Local node ID
- Next message: [Slony1-general] query slony to find which node is master
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Franco Pieressa <fpieressa at gmail.com> writes: > Hi!? I have a simple question, how can I do to know which is the > local node ID of a DB that is members of a slony cluster?? Are there > some SQL to find it?? I'm playing with failovers, and I want to know > if it's running OK... It is stored in a sequence in the special schema, in sl_local_node_id. The function (again, in the special Slony-I schema), getlocalnodeid() is the "portable" way you're intended to get at the value. Thus, if the cluster is called T1, then you could do... select "_T1".getlocalnodeid('_T1'); > And now, the difficult question :-) I read the article in > http://www.linuxjournal.com/article/7834, and I test the script > promote.sh.? After running it, clear the orginal master db and > replicate the schema from the original slave, how can I do the > switchback, witch a slonik script? May be with a "move set" command, > but how? The slonik script would involve two steps: 1. Lock the replication set lock set (id=1); 2. Move the set origin move set (id=1, old origin = 2, new origin = 1); This would all go into one slonik script consisting of preamble and contents, something like: ---------------------------------------------------- cluster name = 'T1'; node 1 admin conninfo = 'some dsn'; node 2 admin conninfo = 'some dsn'; lock set (id=1); move set (id=1, old origin = 2, new origin = 1); ---------------------------------------------------- You'll obviously have to rename nodes, connection info, and the cluster to correspond with your system's configuration. -- (reverse (concatenate 'string "ofni.sailifa.ac" "@" "enworbbc")) <http://dba2.int.libertyrms.com/> Christopher Browne (416) 673-4124 (land)
- Previous message: [Slony1-general] Local node ID
- Next message: [Slony1-general] query slony to find which node is master
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list