Re: During promotion, new master tries to archive same segment twice

2018-08-16 Thread Phil Endecott
Adrian Klaver wrote: On 08/16/2018 01:48 AM, Phil Endecott wrote: Adrian Klaver wrote: On 08/15/2018 01:25 PM, Phil Endecott wrote: Dear Experts, The above is not clear to me. My best guess: It's not part of the error for the archive command; it's just the next thing in the log file. 

Re: During promotion, new master tries to archive same segment twice

2018-08-16 Thread Adrian Klaver
On 08/16/2018 01:48 AM, Phil Endecott wrote: Adrian Klaver wrote: On 08/15/2018 01:25 PM, Phil Endecott wrote: Dear Experts, The above is not clear to me. My best guess: It's not part of the error for the archive command; it's just the next thing in the log file.  Y is (1) trying write

Re: During promotion, new master tries to archive same segment twice

2018-08-16 Thread Stephen Frost
Greetings, * Phil Endecott (spam_from_pgsql_li...@chezphil.org) wrote: > David Steele wrote: > >pgBackRest has done this for years and it saves a *lot* of headaches. > > The system to which I am sending the WAL files is a rsync.net > account. I use it because of its reliability, but methods for

Re: During promotion, new master tries to archive same segment twice

2018-08-16 Thread David Steele
On 8/16/18 4:37 AM, Phil Endecott wrote: > David Steele wrote: >> On 8/15/18 4:25 PM, Phil Endecott wrote: >>> - Should my archive_command detect the case where it is asked to >>> write the same file again with the same contents, and report success >>> in that case? >> >> Yes. > >> There are a num

Re: During promotion, new master tries to archive same segment twice

2018-08-16 Thread Phil Endecott
Adrian Klaver wrote: On 08/15/2018 01:25 PM, Phil Endecott wrote: Dear Experts, Here is my latest issue with replication: I have 3 systems, X, Y and Z. Initially X is replicated to Y and Y is replicated to Z; in each case the replication involves log-shipping using archive_command and restore

Re: During promotion, new master tries to archive same segment twice

2018-08-16 Thread Phil Endecott
David Steele wrote: On 8/15/18 4:25 PM, Phil Endecott wrote: - Should my archive_command detect the case where it is asked to write the same file again with the same contents, and report success in that case? Yes. There are a number of cases where the same WAL segment can be pushed more th

Re: During promotion, new master tries to archive same segment twice

2018-08-15 Thread Adrian Klaver
On 08/15/2018 01:25 PM, Phil Endecott wrote: Dear Experts, Here is my latest issue with replication: I have 3 systems, X, Y and Z. Initially X is replicated to Y and Y is replicated to Z; in each case the replication involves log-shipping using archive_command and restore_command (via a 4th sy

Re: During promotion, new master tries to archive same segment twice

2018-08-15 Thread David Steele
Hi Phil, On 8/15/18 4:25 PM, Phil Endecott wrote: > > Questions: > > - Can all of this be blamed on the failure of the first attempt > to promote due to the wrong permissions on recovery.conf? Yes, it looks that way. > - Should my archive_command detect the case where it is asked to > write

During promotion, new master tries to archive same segment twice

2018-08-15 Thread Phil Endecott
Dear Experts, Here is my latest issue with replication: I have 3 systems, X, Y and Z. Initially X is replicated to Y and Y is replicated to Z; in each case the replication involves log-shipping using archive_command and restore_command (via a 4th system called "backup") and then streaming. T