The Sixwish project

Linux Notes / Slony-I

PostgreSQL + Slony-I 実験 3 レプリケーション解除

PostgreSQL 7.4.x系と、レプリケーションを行うためのSlony-Iを使って、レプリケーションバックアップを行うと言う企画ネタ。
第四回である今回は、実験編の三回目。

ちなみにOSはWhiteBox Linux 3.x(RHEL3.x Clone)を使用しています。
なお、この文書にしたがって生じた損害などについては一切の責任を負いかねますのでご了承ください。

今回は、設定の解除についての実験。まぁレプリケーションを止める場合の実験ですね。
実験環境その他については、実験編の一回目にまとめたのでそれを参照のこと。

レプリケーション解除

これまでの実験はすべてこなされている状態を想定しています。
現状は、レプリケーションが稼動中で、テーブルは三つ存在するという状態ですね。

解除スクリプトの作成

解除するにもslonikのスクリプトが必要となりますので、それを作成します。

[postgres@labgk slony-master]$ vi slony-stop.sh
#!/bin/bash

if [ ! -f ./slony-setup.sh ]; then
    echo 'slony-setup.sh file not found.\n'
    exit -1
fi
. ./slony-setup.sh


slonik <<_EOF_
  cluster name = $CLUSTERNAME;
#
#
  node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST user=$REPLICATIONUSER';
  node 2 admin conninfo = 'dbname=$SLAVEDBNAME host=$SLAVEHOST user=$REPLICATIONUSER';

  uninstall node(id=1);
  uninstall node(id=2);
_EOF_

根こそぎ削除するので、uninstall nodeを使用します。
drop tableなどのコマンドもあるんですが、uninstallが一番解りやすく、確実に削除できたので、これを使用することをお勧めする。

レプリケーション解除スクリプトの実行

それでは実行

[postgres@labgk slony-master]$ sh slony-stop.sh
<stdin>:7: NOTICE:  Slony-I: Please drop schema "_graycat"
<stdin>:7: NOTICE:  drop cascades to function _graycat.truncatetable(text)
<stdin>:7: NOTICE:  drop cascades to view _graycat.sl_status
<stdin>:7: NOTICE:  drop cascades to rule _RETURN on view _graycat.sl_status
<stdin>:7: NOTICE:  drop cascades to function _graycat.tablehasserialkey(text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.determineattkindserial(text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.determineattkindunique(text,name)
<stdin>:7: NOTICE:  drop cascades to function _graycat.determineidxnameserial(text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.determineidxnameunique(text,name)
<stdin>:7: NOTICE:  drop cascades to function _graycat.tabledropkey(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.tableaddkey(text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.cleanupevent()
<stdin>:7: NOTICE:  drop cascades to function _graycat.forwardconfirm(integer,integer,bigint,timestamp without time zone)
<stdin>:7: NOTICE:  drop cascades to function _graycat.enablesubscription_int(integer,integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.enablesubscription(integer,integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.unsubscribeset_int(integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.unsubscribeset(integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.subscribeset_int(integer,integer,integer,boolean)
<stdin>:7: NOTICE:  drop cascades to function _graycat.subscribeset(integer,integer,integer,boolean)
<stdin>:7: NOTICE:  drop cascades to function _graycat.altertablerestore(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.altertableforreplication(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.ddlscript_int(integer,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.ddlscript(integer,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.droptrigger_int(integer,name)
<stdin>:7: NOTICE:  drop cascades to function _graycat.droptrigger(integer,name)
<stdin>:7: NOTICE:  drop cascades to function _graycat.storetrigger_int(integer,name)
<stdin>:7: NOTICE:  drop cascades to function _graycat.storetrigger(integer,name)
<stdin>:7: NOTICE:  drop cascades to function _graycat.sequencesetvalue(integer,integer,bigint,bigint)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setmovesequence_int(integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setmovesequence(integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setmovetable_int(integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setmovetable(integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setdropsequence_int(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setdropsequence(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setaddsequence_int(integer,integer,text,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setaddsequence(integer,integer,text,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setdroptable_int(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setdroptable(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setaddtable_int(integer,integer,text,name,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setaddtable(integer,integer,text,name,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.mergeset_int(integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.mergeset(integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.dropset_int(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.dropset(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.moveset_int(integer,integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.moveset(integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.unlockset(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.lockset(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.storeset_int(integer,integer,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.storeset(integer,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.droplisten_int(integer,integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.droplisten(integer,integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.storelisten_int(integer,integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.storelisten(integer,integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.droppath_int(integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.droppath(integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.storepath_int(integer,integer,text,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.storepath(integer,integer,text,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.uninstallnode()
<stdin>:7: NOTICE:  drop cascades to function _graycat.failoverset_int(integer,integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.failednode2(integer,integer,integer,bigint,bigint)
<stdin>:7: NOTICE:  drop cascades to function _graycat.failednode(integer,integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.dropnode_int(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.dropnode(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.disablenode_int(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.disablenode(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.enablenode_int(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.enablenode(integer)
<stdin>:7: NOTICE:  drop cascades to function _graycat.storenode_int(integer,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.storenode(integer,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.initializelocalnode(integer,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.slonyversion()
<stdin>:7: NOTICE:  drop cascades to function _graycat.slonyversionpatchlevel()
<stdin>:7: NOTICE:  drop cascades to function _graycat.slonyversionminor()
<stdin>:7: NOTICE:  drop cascades to function _graycat.slonyversionmajor()
<stdin>:7: NOTICE:  drop cascades to function _graycat.cleanuplistener()
<stdin>:7: NOTICE:  drop cascades to function _graycat.terminatenodeconnections(name)
<stdin>:7: NOTICE:  drop cascades to function _graycat.logtrigger()
<stdin>:7: NOTICE:  drop cascades to function _graycat.getsessionrole(name)
<stdin>:7: NOTICE:  drop cascades to function _graycat.setsessionrole(name,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.getmoduleversion()
<stdin>:7: NOTICE:  drop cascades to function _graycat.getlocalnodeid(name)
<stdin>:7: NOTICE:  drop cascades to function _graycat.lockedset()
<stdin>:7: NOTICE:  drop cascades to function _graycat.denyaccess()
<stdin>:7: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text,text,text,text,text,text,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text,text,text,text,text,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text,text,text,text,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text,text,text,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text,text,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.createevent(name,text,text)
<stdin>:7: NOTICE:  drop cascades to function _graycat.createevent(name,text)
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_config_lock
<stdin>:7: NOTICE:  drop cascades to sequence _graycat.sl_log_status
<stdin>:7: NOTICE:  drop cascades to sequence _graycat.sl_rowid_seq
<stdin>:7: NOTICE:  drop cascades to sequence _graycat.sl_action_seq
<stdin>:7: NOTICE:  drop cascades to sequence _graycat.sl_event_seq
<stdin>:7: NOTICE:  drop cascades to sequence _graycat.sl_local_node_id
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_log_2
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_log_1
<stdin>:7: NOTICE:  drop cascades to view _graycat.sl_seqlastvalue
<stdin>:7: NOTICE:  drop cascades to rule _RETURN on view _graycat.sl_seqlastvalue
<stdin>:7: NOTICE:  drop cascades to function _graycat.sequencelastvalue(text)
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_seqlog
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_confirm
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_event
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_subscribe
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_listen
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_path
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_sequence
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_trigger
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_table
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_setsync
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_set
<stdin>:7: NOTICE:  drop cascades to table _graycat.sl_node
<stdin>:7: NOTICE:  drop cascades to function _graycat.xxid_ge_snapshot(_graycat.xxid,_graycat.xxid_snapshot)
<stdin>:7: NOTICE:  drop cascades to function _graycat.xxid_lt_snapshot(_graycat.xxid,_graycat.xxid_snapshot)
<stdin>:7: NOTICE:  drop cascades to type _graycat.xxid_snapshot[]
<stdin>:7: NOTICE:  drop cascades to type _graycat.xxid_snapshot
<stdin>:7: NOTICE:  drop cascades to function _graycat.xxid_snapshot_out(_graycat.xxid_snapshot)
<stdin>:7: NOTICE:  drop cascades to function _graycat.xxid_snapshot_in(cstring)
<stdin>:7: NOTICE:  drop cascades to operator class _graycat.xxid_ops for btree
<stdin>:7: NOTICE:  drop cascades to function _graycat.getmaxxid()
<stdin>:7: NOTICE:  drop cascades to function _graycat.getminxid()
<stdin>:7: NOTICE:  drop cascades to function _graycat.getcurrentxid()
<stdin>:7: NOTICE:  drop cascades to function _graycat.btxxidcmp(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to function _graycat.xxidge(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to operator >=(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to function _graycat.xxidgt(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to operator >(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to function _graycat.xxidle(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to operator <=(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to function _graycat.xxidlt(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to operator <(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to function _graycat.xxidne(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to operator <>(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to function _graycat.xxideq(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to operator =(_graycat.xxid,_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to type _graycat.xxid[]
<stdin>:7: NOTICE:  drop cascades to type _graycat.xxid
<stdin>:7: NOTICE:  drop cascades to cast from _graycat.xxid to xid
<stdin>:7: NOTICE:  drop cascades to cast from xid to _graycat.xxid
<stdin>:7: NOTICE:  drop cascades to function _graycat.xxidout(_graycat.xxid)
<stdin>:7: NOTICE:  drop cascades to function _graycat.xxidin(cstring)
<stdin>:8: NOTICE:  Slony-I: Please drop schema "_graycat"
<stdin>:8: NOTICE:  drop cascades to function _graycat.truncatetable(text)
<stdin>:8: NOTICE:  drop cascades to view _graycat.sl_status
<stdin>:8: NOTICE:  drop cascades to rule _RETURN on view _graycat.sl_status
<stdin>:8: NOTICE:  drop cascades to function _graycat.tablehasserialkey(text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.determineattkindserial(text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.determineattkindunique(text,name)
<stdin>:8: NOTICE:  drop cascades to function _graycat.determineidxnameserial(text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.determineidxnameunique(text,name)
<stdin>:8: NOTICE:  drop cascades to function _graycat.tabledropkey(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.tableaddkey(text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.cleanupevent()
<stdin>:8: NOTICE:  drop cascades to function _graycat.forwardconfirm(integer,integer,bigint,timestamp without time zone)
<stdin>:8: NOTICE:  drop cascades to function _graycat.enablesubscription_int(integer,integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.enablesubscription(integer,integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.unsubscribeset_int(integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.unsubscribeset(integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.subscribeset_int(integer,integer,integer,boolean)
<stdin>:8: NOTICE:  drop cascades to function _graycat.subscribeset(integer,integer,integer,boolean)
<stdin>:8: NOTICE:  drop cascades to function _graycat.altertablerestore(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.altertableforreplication(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.ddlscript_int(integer,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.ddlscript(integer,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.droptrigger_int(integer,name)
<stdin>:8: NOTICE:  drop cascades to function _graycat.droptrigger(integer,name)
<stdin>:8: NOTICE:  drop cascades to function _graycat.storetrigger_int(integer,name)
<stdin>:8: NOTICE:  drop cascades to function _graycat.storetrigger(integer,name)
<stdin>:8: NOTICE:  drop cascades to function _graycat.sequencesetvalue(integer,integer,bigint,bigint)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setmovesequence_int(integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setmovesequence(integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setmovetable_int(integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setmovetable(integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setdropsequence_int(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setdropsequence(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setaddsequence_int(integer,integer,text,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setaddsequence(integer,integer,text,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setdroptable_int(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setdroptable(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setaddtable_int(integer,integer,text,name,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setaddtable(integer,integer,text,name,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.mergeset_int(integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.mergeset(integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.dropset_int(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.dropset(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.moveset_int(integer,integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.moveset(integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.unlockset(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.lockset(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.storeset_int(integer,integer,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.storeset(integer,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.droplisten_int(integer,integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.droplisten(integer,integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.storelisten_int(integer,integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.storelisten(integer,integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.droppath_int(integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.droppath(integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.storepath_int(integer,integer,text,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.storepath(integer,integer,text,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.uninstallnode()
<stdin>:8: NOTICE:  drop cascades to function _graycat.failoverset_int(integer,integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.failednode2(integer,integer,integer,bigint,bigint)
<stdin>:8: NOTICE:  drop cascades to function _graycat.failednode(integer,integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.dropnode_int(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.dropnode(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.disablenode_int(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.disablenode(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.enablenode_int(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.enablenode(integer)
<stdin>:8: NOTICE:  drop cascades to function _graycat.storenode_int(integer,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.storenode(integer,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.initializelocalnode(integer,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.slonyversion()
<stdin>:8: NOTICE:  drop cascades to function _graycat.slonyversionpatchlevel()
<stdin>:8: NOTICE:  drop cascades to function _graycat.slonyversionminor()
<stdin>:8: NOTICE:  drop cascades to function _graycat.slonyversionmajor()
<stdin>:8: NOTICE:  drop cascades to function _graycat.cleanuplistener()
<stdin>:8: NOTICE:  drop cascades to function _graycat.terminatenodeconnections(name)
<stdin>:8: NOTICE:  drop cascades to function _graycat.logtrigger()
<stdin>:8: NOTICE:  drop cascades to function _graycat.getsessionrole(name)
<stdin>:8: NOTICE:  drop cascades to function _graycat.setsessionrole(name,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.getmoduleversion()
<stdin>:8: NOTICE:  drop cascades to function _graycat.getlocalnodeid(name)
<stdin>:8: NOTICE:  drop cascades to function _graycat.lockedset()
<stdin>:8: NOTICE:  drop cascades to function _graycat.denyaccess()
<stdin>:8: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text,text,text,text,text,text,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text,text,text,text,text,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text,text,text,text,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text,text,text,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text,text,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.createevent(name,text,text,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.createevent(name,text,text)
<stdin>:8: NOTICE:  drop cascades to function _graycat.createevent(name,text)
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_config_lock
<stdin>:8: NOTICE:  drop cascades to sequence _graycat.sl_log_status
<stdin>:8: NOTICE:  drop cascades to sequence _graycat.sl_rowid_seq
<stdin>:8: NOTICE:  drop cascades to sequence _graycat.sl_action_seq
<stdin>:8: NOTICE:  drop cascades to sequence _graycat.sl_event_seq
<stdin>:8: NOTICE:  drop cascades to sequence _graycat.sl_local_node_id
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_log_2
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_log_1
<stdin>:8: NOTICE:  drop cascades to view _graycat.sl_seqlastvalue
<stdin>:8: NOTICE:  drop cascades to rule _RETURN on view _graycat.sl_seqlastvalue
<stdin>:8: NOTICE:  drop cascades to function _graycat.sequencelastvalue(text)
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_seqlog
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_confirm
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_event
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_subscribe
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_listen
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_path
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_sequence
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_trigger
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_table
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_setsync
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_set
<stdin>:8: NOTICE:  drop cascades to table _graycat.sl_node
<stdin>:8: NOTICE:  drop cascades to function _graycat.xxid_ge_snapshot(_graycat.xxid,_graycat.xxid_snapshot)
<stdin>:8: NOTICE:  drop cascades to function _graycat.xxid_lt_snapshot(_graycat.xxid,_graycat.xxid_snapshot)
<stdin>:8: NOTICE:  drop cascades to type _graycat.xxid_snapshot[]
<stdin>:8: NOTICE:  drop cascades to type _graycat.xxid_snapshot
<stdin>:8: NOTICE:  drop cascades to function _graycat.xxid_snapshot_out(_graycat.xxid_snapshot)
<stdin>:8: NOTICE:  drop cascades to function _graycat.xxid_snapshot_in(cstring)
<stdin>:8: NOTICE:  drop cascades to operator class _graycat.xxid_ops for btree
<stdin>:8: NOTICE:  drop cascades to function _graycat.getmaxxid()
<stdin>:8: NOTICE:  drop cascades to function _graycat.getminxid()
<stdin>:8: NOTICE:  drop cascades to function _graycat.getcurrentxid()
<stdin>:8: NOTICE:  drop cascades to function _graycat.btxxidcmp(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to function _graycat.xxidge(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to operator >=(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to function _graycat.xxidgt(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to operator >(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to function _graycat.xxidle(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to operator <=(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to function _graycat.xxidlt(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to operator <(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to function _graycat.xxidne(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to operator <>(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to function _graycat.xxideq(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to operator =(_graycat.xxid,_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to type _graycat.xxid[]
<stdin>:8: NOTICE:  drop cascades to type _graycat.xxid
<stdin>:8: NOTICE:  drop cascades to cast from _graycat.xxid to xid
<stdin>:8: NOTICE:  drop cascades to cast from xid to _graycat.xxid
<stdin>:8: NOTICE:  drop cascades to function _graycat.xxidout(_graycat.xxid)
<stdin>:8: NOTICE:  drop cascades to function _graycat.xxidin(cstring)
[postgres@labgk slony-master]$

これで終わりです。
基本的に、MASTER、SLAVEともにサービスが稼動中の場合は、slonのプロセスも一緒に消えてくれます。

解除の注意点

今回作成したSlonikスクリプトは、サービスが稼動していることが前提となったスクリプトです。
もし、片方だけ削除する場合は、以下のようなスクリプトにする必要があります。

#!/bin/bash

if [ ! -f ./slony-setup.sh ]; then
    echo 'slony-setup.sh file not found.\n'
    exit -1
fi
. ./slony-setup.sh


slonik <<_EOF_
  cluster name = $CLUSTERNAME;
#
#
#  node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST user=$REPLICATIONUSER';
  node 2 admin conninfo = 'dbname=$SLAVEDBNAME host=$SLAVEHOST user=$REPLICATIONUSER';

#  uninstall node(id=1);
  uninstall node(id=2);
_EOF_

この場合、node 2に登録されているサーバーからレプリケーションに必要な情報を削除してくれます。
『MASTERがこけたからSLAVEで稼動するけれど、そのついでにSlonyも止めたい』なんて場合に使うことになるでしょう。

なお、このuninstall node、プライマリキーが無いテーブルの数とそのデータレコード数で、かかる時間が変化します。
反応が無くても、暫く待ってあげることが重要。途中で止めると復旧が大変なことになります。