Re: [GENERAL] Streaming replication failover/failback

2016-11-22 Thread Israel Brewster
On Nov 18, 2016, at 5:48 AM, Jehan-Guillaume de Rorthais wrote: > > On Thu, 17 Nov 2016 08:26:59 -0900 > Israel Brewster mailto:isr...@ravnalaska.net>> wrote: > >>> On Nov 16, 2016, at 4:24 PM, Adrian Klaver >>> wrote: >>> >>> On 11/16/2016 04:51 PM, Israel Brewster wrote: I've been pla

Re: [GENERAL] Streaming replication failover/failback

2016-11-18 Thread Jehan-Guillaume de Rorthais
On Thu, 17 Nov 2016 08:26:59 -0900 Israel Brewster wrote: > > On Nov 16, 2016, at 4:24 PM, Adrian Klaver > > wrote: > > > > On 11/16/2016 04:51 PM, Israel Brewster wrote: > >> I've been playing around with streaming replication, and discovered that > >> the following series of steps *appears*

Re: [GENERAL] Streaming replication failover/failback

2016-11-17 Thread Israel Brewster
On Nov 16, 2016, at 11:39 PM, Jehan-Guillaume de Rorthais wrote: > > On Wed, 16 Nov 2016 15:51:26 -0900 > Israel Brewster mailto:isr...@ravnalaska.net>> wrote: > >> I've been playing around with streaming replication, and discovered that the >> following series of steps *appears* to work withou

Re: [GENERAL] Streaming replication failover/failback

2016-11-17 Thread Israel Brewster
> On Nov 16, 2016, at 4:24 PM, Adrian Klaver wrote: > > On 11/16/2016 04:51 PM, Israel Brewster wrote: >> I've been playing around with streaming replication, and discovered that >> the following series of steps *appears* to work without complaint: >> >> - Start with master on server A, slave

Re: [GENERAL] Streaming replication failover/failback

2016-11-17 Thread Jehan-Guillaume de Rorthais
On Wed, 16 Nov 2016 15:51:26 -0900 Israel Brewster wrote: > I've been playing around with streaming replication, and discovered that the > following series of steps *appears* to work without complaint: > > - Start with master on server A, slave on server B, replicating via streaming > replicatio

Re: [GENERAL] Streaming replication failover/failback

2016-11-16 Thread Adrian Klaver
On 11/16/2016 04:51 PM, Israel Brewster wrote: I've been playing around with streaming replication, and discovered that the following series of steps *appears* to work without complaint: - Start with master on server A, slave on server B, replicating via streaming replication with replication sl

[GENERAL] Streaming replication failover/failback

2016-11-16 Thread Israel Brewster
I've been playing around with streaming replication, and discovered that the following series of steps *appears* to work without complaint:- Start with master on server A, slave on server B, replicating via streaming replication with replication slots.- Shut down master on A- Promote slave on B to

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-15 Thread Patrick B
sorry... wrong email. Will create a new topic.

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-15 Thread Patrick B
Hi guys, I'm setting up a new slave server, using Postgres 9.2. This new slave server I'll call: New_slave. I ran this command, from the new_slave server. It will connects to my other slave and copy the DB. ssh postgres@slave05 'pg_basebackup --pgdata=- --format=tar > --label=new_slave --progres

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Adrian Klaver
On 07/10/2016 07:17 PM, Patrick B wrote: If the master server can't send the wal_files through the slaves, shouldn't the wal_files be in "background" waiting to be delivered? Short version, yes, assuming you are talking about archiving the WAL files somewhere and assuming there is sufficient

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread John R Pierce
On 7/10/2016 8:51 PM, Patrick B wrote: what if the network goes down? that WAL server could be located in the same data center as the master database server. if your local area network goes down, well, you're probably in a world of hurt. if the wide area network is mission critical, it wou

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
2016-07-11 15:48 GMT+12:00 John R Pierce : > On 7/10/2016 4:28 PM, Patrick B wrote: > >> >> archive_command = 'cp %p /var/lib/pgsql/archive/%f' >> >> >> That would be ok right guys? >> >> > > normally, you want to ship your WAL archives to a NFS server or something > similar, which the master and

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread John R Pierce
On 7/10/2016 4:28 PM, Patrick B wrote: archive_command = 'cp %p /var/lib/pgsql/archive/%f' That would be ok right guys? normally, you want to ship your WAL archives to a NFS server or something similar, which the master and all the slaves can read. -- john r pierce, recycling bits in sa

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
oh ok.. got it.. wal_keep_segments = To prevent the primary server from removing the WAL segments required for the standby server before shipping them, set the minimum number of segments retained in the pg_xlog directory so it would be ok just by increasing that parameter, right? Once the serve

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
If the master server can't send the wal_files through the slaves, shouldn't the wal_files be in "background" waiting to be delivered? Otherwise what's the purpose of them? If a network fails I'd loose those files?

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
2016-07-11 12:18 GMT+12:00 Adrian Klaver : > On 07/10/2016 04:28 PM, Patrick B wrote: > >> archive_command = 'cp %p /var/lib/pgsql/archive/%f' >> > > This would be where? > master server > > And does the corresponding restore_command point to the same place? yes.. the slaves have the restore_

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Adrian Klaver
On 07/10/2016 04:28 PM, Patrick B wrote: archive_command = 'cp %p /var/lib/pgsql/archive/%f' This would be where? And does the corresponding restore_command point to the same place? That would be ok right guys? I will also setup wal_keep_segments to 512 The WAL segments kept would be d

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
archive_command = 'cp %p /var/lib/pgsql/archive/%f' That would be ok right guys? I will also setup wal_keep_segments to 512

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
thanks guys.. thanks for all the comments... I'm not shipping the wal_files into master, I actually ship them into slave and another backup server as well. So I'll have to change my archive_command then :) Thanks!

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread John R Pierce
On 7/10/2016 2:42 PM, Andreas Kretschmer wrote: 1. When the connection comes back, will the master and slave work as expected? The streaming replication should be ok? if the master holds all needed WAL's there should be no problem. You can ensure that with wal_keep_segments, or, in newer versio

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Andreas Kretschmer
Am 10.07.2016 um 23:19 schrieb Patrick B: Hi all, There will be a network maintenance at the company where my servers are... I've got one master and one slave server, running PostgreSQL 9.2. As the network will be down, the internet won't be working as well as the intranet. Both servers won

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Adrian Klaver
On 07/10/2016 02:19 PM, Patrick B wrote: Hi all, There will be a network maintenance at the company where my servers are... I've got one master and one slave server, running PostgreSQL 9.2. As the network will be down, the internet won't be working as well as the intranet. Both servers won't b

Re: [GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread John R Pierce
On 7/10/2016 2:19 PM, Patrick B wrote: 1. When the connection comes back, will the master and slave work as expected? The streaming replication should be ok? as long as you have sufficient WAL available it should recover fine. you might have to restart the slave to get it to reconnect. 2.

[GENERAL] Streaming replication failover process - Pgsql 9.2

2016-07-10 Thread Patrick B
Hi all, There will be a network maintenance at the company where my servers are... I've got one master and one slave server, running PostgreSQL 9.2. As the network will be down, the internet won't be working as well as the intranet. Both servers won't be able to communicate each other. Not by st

[GENERAL] Streaming Replication Failover

2013-01-16 Thread ning chan
Hi, I have a cluster of 3 nodes Primary is connected by StandbyA (streaming), Standby A is connected by Standby B (streaming). I failed over the cluster 1) stop primary 2) promoted StandbyA Now i see from syslog on Standby B that it is complaining about the timeline mismatch. Replication Status f

[GENERAL] Streaming replication failover with 3 servers

2012-08-06 Thread Stuart Bishop
Hi. I'm trying to work out failover and disaster recovery procedures for a cluster of three servers. Streaming replication is being used with a high wal_keep_segments, no log shipping is happening. I need to avoid the several hours it takes to rebuild a hot standby from scratch. ServerA is the ma

Re: [GENERAL] Streaming replication failover

2011-12-31 Thread Tatsuo Ishii
> I'm in the process of setting up a 9.1-based SR cluster, and I've got a > question on how failover is expected to work in the case of multiple slaves. > http://www.postgresql.org/docs/9.1/static/warm-standby-failover.html says: > > "Some people choose to use a third server to provide backup fo

[GENERAL] Streaming replication failover

2011-12-31 Thread Ben Chobot
I'm in the process of setting up a 9.1-based SR cluster, and I've got a question on how failover is expected to work in the case of multiple slaves. http://www.postgresql.org/docs/9.1/static/warm-standby-failover.html says: "Some people choose to use a third server to provide backup for the new