Slony-I的删除:
接前篇:http://www.cnblogs.com/gaojian/p/3196244.html
简单的Slony-I设置实例
如何删除slony相关的内容呢。
我再另外找一台机器,安装slony,也安装postgresql(这个是为防止万一而已)
编写脚本:
[postgres@pg100 ~]$ cat remove.sh
#!/bin/sh CLUSTERNAME=testdb3_cluster
MASTERDBNAME=testdb3
SLAVEDBNAME=testdb3
MASTERHOST=192.168.10.102
SLAVEHOST=192.168.10.101
REPLICATIONUSER=postgres /usr/local/slony/bin/slonik <<_EOF_
#--
# define the namespace the replication system
# uses in our example it is slony_example
#--
cluster name = $CLUSTERNAME; #--
# admin conninfo's are used by slonik to connect to
# the nodes one for eachnode on each side of the cluster,
# the syntax is that of PQconnectdb in
# the C-API
# --
node admin conninfo = 'dbname=$MASTERDBNAME \
host=$MASTERHOST user=$REPLICATIONUSER';
node admin conninfo = 'dbname=$SLAVEDBNAME \
host=$SLAVEHOST user=$REPLICATIONUSER'; uninstall node (id = );
uninstall node (id = );
_EOF_
[postgres@pg100 ~]$
然后运行:
[postgres@pg100 ~]$ sh remove.sh
<stdin>:: NOTICE: Slony-I: Please drop schema "_testdb3_cluster"
<stdin>:: NOTICE: drop cascades to other objects
DETAIL: drop cascades to table _testdb3_cluster.sl_node
drop cascades to table _testdb3_cluster.sl_nodelock
drop cascades to table _testdb3_cluster.sl_set
drop cascades to table _testdb3_cluster.sl_setsync
drop cascades to table _testdb3_cluster.sl_table
drop cascades to table _testdb3_cluster.sl_sequence
drop cascades to table _testdb3_cluster.sl_path
drop cascades to table _testdb3_cluster.sl_listen
drop cascades to table _testdb3_cluster.sl_subscribe
drop cascades to table _testdb3_cluster.sl_event
drop cascades to table _testdb3_cluster.sl_confirm
drop cascades to table _testdb3_cluster.sl_seqlog
drop cascades to function _testdb3_cluster.sequencelastvalue(text)
drop cascades to table _testdb3_cluster.sl_log_1
drop cascades to table _testdb3_cluster.sl_log_2
drop cascades to table _testdb3_cluster.sl_registry
drop cascades to view _testdb3_cluster.sl_seqlastvalue
drop cascades to sequence _testdb3_cluster.sl_local_node_id
drop cascades to sequence _testdb3_cluster.sl_event_seq
drop cascades to sequence _testdb3_cluster.sl_action_seq
drop cascades to sequence _testdb3_cluster.sl_log_status
drop cascades to table _testdb3_cluster.sl_config_lock
drop cascades to table _testdb3_cluster.sl_event_lock
drop cascades to table _testdb3_cluster.sl_archive_counter
drop cascades to table _testdb3_cluster.sl_components
drop cascades to type _testdb3_cluster.vactables
drop cascades to function _testdb3_cluster.createevent(name,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text,text,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text,text,text,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text,text,text,text,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text,text,text,text,text,text,text)
drop cascades to function _testdb3_cluster.denyaccess()
drop cascades to trigger _testdb3_cluster_denyaccess on table t1
drop cascades to function _testdb3_cluster.lockedset()
drop cascades to function _testdb3_cluster.getlocalnodeid(name)
drop cascades to function _testdb3_cluster.getmoduleversion()
drop cascades to function _testdb3_cluster.resetsession()
drop cascades to function _testdb3_cluster.checkmoduleversion()
drop cascades to function _testdb3_cluster.decode_tgargs(bytea)
drop cascades to function _testdb3_cluster.logtrigger()
drop cascades to trigger _testdb3_cluster_logtrigger on table t1
drop cascades to function _testdb3_cluster.terminatenodeconnections(integer)
drop cascades to function _testdb3_cluster.killbackend(integer,text)
drop cascades to function _testdb3_cluster.seqtrack(integer,bigint)
drop cascades to function _testdb3_cluster.slon_quote_brute(text)
drop cascades to function _testdb3_cluster.slon_quote_input(text)
drop cascades to function _testdb3_cluster.slonyversionmajor()
drop cascades to function _testdb3_cluster.slonyversionminor()
drop cascades to function _testdb3_cluster.slonyversionpatchlevel()
drop cascades to function _testdb3_cluster.slonyversion()
drop cascades to function _testdb3_cluster.registry_set_int4(text,integer)
drop cascades to function _testdb3_cluster.registry_get_int4(text,integer)
drop cascades to function _testdb3_cluster.registry_set_text(text,text)
drop cascades to function _testdb3_cluster.registry_get_text(text,text)
drop cascades to function _testdb3_cluster.registry_set_timestamp(text,timestamp with time zone)
drop cascades to function _testdb3_cluster.registry_get_timestamp(text,timestamp with time zone)
drop cascades to function _testdb3_cluster.cleanupnodelock()
drop cascades to function _testdb3_cluster.registernodeconnection(integer)
drop cascades to function _testdb3_cluster.initializelocalnode(integer,text)
drop cascades to function _testdb3_cluster.storenode(integer,text)
drop cascades to function _testdb3_cluster.storenode_int(integer,text)
drop cascades to function _testdb3_cluster.enablenode(integer)
drop cascades to function _testdb3_cluster.enablenode_int(integer)
drop cascades to function _testdb3_cluster.disablenode(integer)
drop cascades to function _testdb3_cluster.disablenode_int(integer)
drop cascades to function _testdb3_cluster.dropnode(integer)
drop cascades to function _testdb3_cluster.dropnode_int(integer)
drop cascades to function _testdb3_cluster.failednode(integer,integer)
drop cascades to function _testdb3_cluster.failednode2(integer,integer,integer,bigint,bigint)
drop cascades to function _testdb3_cluster.failoverset_int(integer,integer,integer,bigint)
drop cascades to function _testdb3_cluster.uninstallnode()
drop cascades to function _testdb3_cluster.clonenodeprepare(integer,integer,text)
drop cascades to function _testdb3_cluster.clonenodeprepare_int(integer,integer,text)
drop cascades to function _testdb3_cluster.clonenodefinish(integer,integer)
drop cascades to function _testdb3_cluster.storepath(integer,integer,text,integer)
drop cascades to function _testdb3_cluster.storepath_int(integer,integer,text,integer)
drop cascades to function _testdb3_cluster.droppath(integer,integer)
drop cascades to function _testdb3_cluster.droppath_int(integer,integer)
drop cascades to function _testdb3_cluster.storelisten(integer,integer,integer)
drop cascades to function _testdb3_cluster.storelisten_int(integer,integer,integer)
drop cascades to function _testdb3_cluster.droplisten(integer,integer,integer)
drop cascades to function _testdb3_cluster.droplisten_int(integer,integer,integer)
drop cascades to function _testdb3_cluster.storeset(integer,text)
drop cascades to function _testdb3_cluster.storeset_int(integer,integer,text)
drop cascades to function _testdb3_cluster.lockset(integer)
drop cascades to function _testdb3_cluster.unlockset(integer)
drop cascades to function _testdb3_cluster.moveset(integer,integer)
drop cascades to function _testdb3_cluster.moveset_int(integer,integer,integer,bigint)
drop cascades to function _testdb3_cluster.dropset(integer)
drop cascades to function _testdb3_cluster.dropset_int(integer)
drop cascades to function _testdb3_cluster.mergeset(integer,integer)
drop cascades to function _testdb3_cluster.issubscriptioninprogress(integer)
drop cascades to function _testdb3_cluster.mergeset_int(integer,integer)
drop cascades to function _testdb3_cluster.setaddtable(integer,integer,text,name,text)
drop cascades to function _testdb3_cluster.setaddtable_int(integer,integer,text,name,text)
drop cascades to function _testdb3_cluster.setdroptable(integer)
and other objects (see server log for list)
<stdin>:: NOTICE: Slony-I: Please drop schema "_testdb3_cluster"
<stdin>:: NOTICE: drop cascades to other objects
DETAIL: drop cascades to table _testdb3_cluster.sl_node
drop cascades to table _testdb3_cluster.sl_nodelock
drop cascades to table _testdb3_cluster.sl_set
drop cascades to table _testdb3_cluster.sl_setsync
drop cascades to table _testdb3_cluster.sl_table
drop cascades to table _testdb3_cluster.sl_sequence
drop cascades to table _testdb3_cluster.sl_path
drop cascades to table _testdb3_cluster.sl_listen
drop cascades to table _testdb3_cluster.sl_subscribe
drop cascades to table _testdb3_cluster.sl_event
drop cascades to table _testdb3_cluster.sl_confirm
drop cascades to table _testdb3_cluster.sl_seqlog
drop cascades to function _testdb3_cluster.sequencelastvalue(text)
drop cascades to table _testdb3_cluster.sl_log_1
drop cascades to table _testdb3_cluster.sl_log_2
drop cascades to table _testdb3_cluster.sl_registry
drop cascades to view _testdb3_cluster.sl_seqlastvalue
drop cascades to sequence _testdb3_cluster.sl_local_node_id
drop cascades to sequence _testdb3_cluster.sl_event_seq
drop cascades to sequence _testdb3_cluster.sl_action_seq
drop cascades to sequence _testdb3_cluster.sl_log_status
drop cascades to table _testdb3_cluster.sl_config_lock
drop cascades to table _testdb3_cluster.sl_event_lock
drop cascades to table _testdb3_cluster.sl_archive_counter
drop cascades to table _testdb3_cluster.sl_components
drop cascades to type _testdb3_cluster.vactables
drop cascades to function _testdb3_cluster.createevent(name,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text,text,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text,text,text,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text,text,text,text,text,text)
drop cascades to function _testdb3_cluster.createevent(name,text,text,text,text,text,text,text,text,text)
drop cascades to function _testdb3_cluster.denyaccess()
drop cascades to trigger _testdb3_cluster_denyaccess on table t1
drop cascades to function _testdb3_cluster.lockedset()
drop cascades to function _testdb3_cluster.getlocalnodeid(name)
drop cascades to function _testdb3_cluster.getmoduleversion()
drop cascades to function _testdb3_cluster.resetsession()
drop cascades to function _testdb3_cluster.checkmoduleversion()
drop cascades to function _testdb3_cluster.decode_tgargs(bytea)
drop cascades to function _testdb3_cluster.logtrigger()
drop cascades to trigger _testdb3_cluster_logtrigger on table t1
drop cascades to function _testdb3_cluster.terminatenodeconnections(integer)
drop cascades to function _testdb3_cluster.killbackend(integer,text)
drop cascades to function _testdb3_cluster.seqtrack(integer,bigint)
drop cascades to function _testdb3_cluster.slon_quote_brute(text)
drop cascades to function _testdb3_cluster.slon_quote_input(text)
drop cascades to function _testdb3_cluster.slonyversionmajor()
drop cascades to function _testdb3_cluster.slonyversionminor()
drop cascades to function _testdb3_cluster.slonyversionpatchlevel()
drop cascades to function _testdb3_cluster.slonyversion()
drop cascades to function _testdb3_cluster.registry_set_int4(text,integer)
drop cascades to function _testdb3_cluster.registry_get_int4(text,integer)
drop cascades to function _testdb3_cluster.registry_set_text(text,text)
drop cascades to function _testdb3_cluster.registry_get_text(text,text)
drop cascades to function _testdb3_cluster.registry_set_timestamp(text,timestamp with time zone)
drop cascades to function _testdb3_cluster.registry_get_timestamp(text,timestamp with time zone)
drop cascades to function _testdb3_cluster.cleanupnodelock()
drop cascades to function _testdb3_cluster.registernodeconnection(integer)
drop cascades to function _testdb3_cluster.initializelocalnode(integer,text)
drop cascades to function _testdb3_cluster.storenode(integer,text)
drop cascades to function _testdb3_cluster.storenode_int(integer,text)
drop cascades to function _testdb3_cluster.enablenode(integer)
drop cascades to function _testdb3_cluster.enablenode_int(integer)
drop cascades to function _testdb3_cluster.disablenode(integer)
drop cascades to function _testdb3_cluster.disablenode_int(integer)
drop cascades to function _testdb3_cluster.dropnode(integer)
drop cascades to function _testdb3_cluster.dropnode_int(integer)
drop cascades to function _testdb3_cluster.failednode(integer,integer)
drop cascades to function _testdb3_cluster.failednode2(integer,integer,integer,bigint,bigint)
drop cascades to function _testdb3_cluster.failoverset_int(integer,integer,integer,bigint)
drop cascades to function _testdb3_cluster.uninstallnode()
drop cascades to function _testdb3_cluster.clonenodeprepare(integer,integer,text)
drop cascades to function _testdb3_cluster.clonenodeprepare_int(integer,integer,text)
drop cascades to function _testdb3_cluster.clonenodefinish(integer,integer)
drop cascades to function _testdb3_cluster.storepath(integer,integer,text,integer)
drop cascades to function _testdb3_cluster.storepath_int(integer,integer,text,integer)
drop cascades to function _testdb3_cluster.droppath(integer,integer)
drop cascades to function _testdb3_cluster.droppath_int(integer,integer)
drop cascades to function _testdb3_cluster.storelisten(integer,integer,integer)
drop cascades to function _testdb3_cluster.storelisten_int(integer,integer,integer)
drop cascades to function _testdb3_cluster.droplisten(integer,integer,integer)
drop cascades to function _testdb3_cluster.droplisten_int(integer,integer,integer)
drop cascades to function _testdb3_cluster.storeset(integer,text)
drop cascades to function _testdb3_cluster.storeset_int(integer,integer,text)
drop cascades to function _testdb3_cluster.lockset(integer)
drop cascades to function _testdb3_cluster.unlockset(integer)
drop cascades to function _testdb3_cluster.moveset(integer,integer)
drop cascades to function _testdb3_cluster.moveset_int(integer,integer,integer,bigint)
drop cascades to function _testdb3_cluster.dropset(integer)
drop cascades to function _testdb3_cluster.dropset_int(integer)
drop cascades to function _testdb3_cluster.mergeset(integer,integer)
drop cascades to function _testdb3_cluster.issubscriptioninprogress(integer)
drop cascades to function _testdb3_cluster.mergeset_int(integer,integer)
drop cascades to function _testdb3_cluster.setaddtable(integer,integer,text,name,text)
drop cascades to function _testdb3_cluster.setaddtable_int(integer,integer,text,name,text)
drop cascades to function _testdb3_cluster.setdroptable(integer)
and other objects (see server log for list)
[postgres@pg100 ~]$
删除成功。
Slony-I的删除:的更多相关文章
- PostgreSQL Replication之第十章 配置Slony(6)
10.6 执行故障切换 一旦您学会了如何复制表并将它们添加到集合中,是时候学习故障转移了.基本上,我们可以在两个两种类型的故障转移之间做出区分: • 计划内故障转移 • 计划外故障转移和崩溃 在本节, ...
- PostgreSQL Replication之第十章 配置Slony(5)
10.5 给复制添加表和管理的问题 一旦我们增加了此表到系统中,我们可以将它添加到复制设置.这样做有点复杂.首先,我们必须创建我们自己的新表集合并把这个和我们已经有的表合并.因此,过一段时间,我们将有 ...
- PostgreSQL逻辑复制之slony篇
Slony是PostgreSQL领域中最广泛的复制解决方案之一.它不仅是最古老的复制实现之一,它也是一个拥有最广泛的外部工具支持的工具,比如pgAdmin3.多年来,Slony是在PostgreSQL ...
- "无法删除数据库,因为该数据库当前正在使用"问题解决
异常处理汇总-数据库系列 http://www.cnblogs.com/dunitian/p/4522990.html 以前刚学数据库的时候比较苦恼这个问题,今天删除的时候又看见了,正好一起记录一下 ...
- php批量删除
php批量删除可以实现多条或者全部数据一起删除 新建php文件 显示数据库中内容: <table width="100%" border="1" cell ...
- linux centos中添加删除修改环境变量,设置java环境变量
前言 安装完软件必要添加环境变量.指令很少,然而长时间不写就会不自信:我写的对吗?于是百度开始,于是发现又是各有千秋.好吧,好记星不如烂笔头.当然,最重要的是,百度出来的都他妈的是如何添加环境变量,只 ...
- ASP.NET MVC一次删除多笔记录
批量删除数据记录,如下面的截屏: 先选中想删除的记录,然后点一下删除铵钮,系统将把选中的记录一次性删除.在此,Insus.NET不想每删除一笔记录连接一次数据库. 因此需要把选择的记录一次上传至服务器 ...
- 如何区别数据库删除语句drop与delete与truncate?
1.delete:删除数据表中的行(可以删除某一行,也可以在不删除数据表的情况下删除所有行) 删除某一行:delete from 数据表名称 where 列名称=值: 删除所有行:delete*fro ...
- sql 删除表中的重复记录
嗯,遇见了表中存在重复的记录的问题,直接写sql删除时最快的,才不要慢慢的复制到excel表中慢慢的人工找呢.哼. 如下sql,找出重复的记录,和重复记录中ID值最小的记录(表中ID为自增长) sel ...
随机推荐
- REST构架风格介绍:状态表述转移
REST(Representational State Transfer)是HTTP协议的作者Roy Fielding博士在其博士论文中提出的一种互联网应用构架风格.与以远程对象为核心的ORB和以服务 ...
- 嵌入式 hi3518平台检测网线是否插上
/********************************** (C) COPYRIGHT ******************************* * File Name ...
- linux下的加减运算
命令: echo rep 如果你有些编程方面的概念,最有意思的是用gdb,它可以进行进制转换,浮点数运算,数据类型占用字节数等等,很方便. (gdb) p 2+5$21 = 7(gdb) p 2/5$ ...
- 【转】linux下mkisofs制作光盘映像cdrecord刻录光盘
1.制作光盘映像文件 $mkisofs -R -o /var/tmp/oracle.iso /home/oracle $mkisofs -o myiso.iso /home/oracle/data 补 ...
- vector容器使用总结 .xml
pre{ line-height:1; color:#38ede1; background-color:#5b2814; font-size:16px;}.sysFunc{color:#008080; ...
- unity3d Hair real time rendering 真实头发实时渲染(转)
惊现塞拉酱 算法是Weta Digital根据siggraph2003的论文加以改进,改进之前使用的是Kajiya and Kay’s 模型,它能量不守恒,也就是说不是基于物理的,不准确 电镜下真实头 ...
- ZeroCopyLiteralByteString cannot access superclass
问题描述 在HBase上运行MapReduce作业时,报如下异常:IllegalAccessError: class com.google.protobuf.HBaseZeroCopyByteStri ...
- 【Excel】Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046}:
[Excel]Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-0000000000 ...
- Docker进入主流,PaaS大有可为(转)
add by zhj: 文章简单的说了PaaS所使用的传统容器的缺点,而docker这个容器在一定程度上解决了这些问题,越来越多的PaaS平台使用docker作容器,实现应用的隔离.不过,由于dock ...
- 三、 将DataTable 转换为List
1. 方法public static IList<T> ConvertTo<T>(DataTable table) { if (table == null) { return ...