随笔分类 - postgresql ha
摘要:os: ubuntu 16.04 postgresql: 9.6.8pg_rewind是用于在集簇的时间线分叉以后,同步一个 PostgreSQL 集簇和同一集簇的另一份拷贝的工具。一种典型的场景是在故障切换后让旧的主服务器作为新主机的备机重新上线。其结果等...
阅读全文
摘要:recovery.conf 是 postgresql slave 数据库的重要文件,示例文件为.$ ls -l $PGHOME/share/recovery.conf.sample可以编辑 $PGDATA/recovery.conf异步streamrecov...
阅读全文
摘要:os :oel 6.8postgresql: 9.6.3PostgreSQL9.0 standby数据库在应用WAL日志的同时,也可以提供只读服务,这是PostgreSQL9.0中最激动人心的功能,这个功能在oracle数据库中也只是最新版本11g中才有的新...
阅读全文
摘要:os: centos 7.4 postgresql: 9.6.9replication slots 是从postgresql 9.4 引入的, 主要是提供了一种自动化的方法来确保主控机在所有的后备机收到 WAL 段 之前不会移除它们,并且主控机也不会移除可能...
阅读全文
摘要:os: centos 7.4 postgresql: 10.4postgresql 10 开始内置了逻辑复制这一强大的功能,之前都是利用extenstion的方式实现逻辑复制,或者是物理复制,slave端都是 readonly操作。使用逻辑复制后,可以在再多...
阅读全文
摘要:vm: Oracle VM VirtualBox 5.2.4 r119785 (Qt5.6.2) os:Debian 8.10 postgresql: 9.1.24机器情况 nodea:192.168.56.100/192.168.165.100 目前是m...
阅读全文
摘要:有些名称发生了变化,xlog =>wal,location => lsnpg_xlog_location_diff pg_wal_lsn_diffpg_current_xlog_location pg_current_w...
阅读全文
摘要:pgsql 环境下有时需要每天同步数据或者新加一个salve时,同时又需要对master不造成影响时,可以采用如下方式。1、暂停 stream 复制$ psqlpsql (9.1.22)Type "help" for help.postgres=# sele...
阅读全文
摘要:vm: Oracle VM VirtualBox 5.2.4 r119785 (Qt5.6.2) os: debian 8.2 postgresql: 9.1.22ip 规划如下:两个网段 # 192.168.56.x # 192.168.165.xnode...
阅读全文
摘要:提升 slave 为 master,前提是 master 已经正常或异常关闭,不可用情况下。 否则会存在两个 master,必然发生数据交叉。1、touch 在recovery.conf 配置的 trigger_file文件$ cat recovery....
阅读全文
摘要:postgres=# select * from pg_stat_replication;-[ RECORD 1 ]----+------------------------------pid | 8467 # sender的进程u...
阅读全文

浙公网安备 33010602011771号