pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Steele <david@pgmasters.net>
To: Phil Endecott <spam_from_pgsql_lists@chezphil.org>
To: pgsql-general@lists.postgresql.org
Subject: Re: During promotion, new master tries to archive same segment twice
Date: Wed, 15 Aug 2018 16:41:27 -0400
Message-ID: <11b405a6-2176-9510-bf5b-ea9c0e860635@pgmasters.net> (raw)
In-Reply-To: <1534364719828@dmwebmail.dmwebmail.chezphil.org>
References: <1534364719828@dmwebmail.dmwebmail.chezphil.org>

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 the same file again with the same contents, and report 
> success in that case?

Yes.  pgBackRest has done this for years and it saves a *lot* of headaches.

> - Is this a bug?

I don't think so.  There are a number of cases where the same WAL
segment can be pushed more than once, especially after failures where
Postgres is not sure that the command completed.  The archive command
should handle this gracefully.

Regards,
-- 
-David
david@pgmasters.net




view thread (9+ messages)  latest in thread

Message-ID: <11b405a6-2176-9510-bf5b-ea9c0e860635@pgmasters.net>
Permalink:  ../11b405a6-2176-9510-bf5b-ea9c0e860635@pgmasters.net/
Also on:    postgresql.org/message-id/11b405a6-2176-9510-bf5b-ea9c0e860635@pgmasters.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: david@pgmasters.net, spam_from_pgsql_lists@chezphil.org
  Subject: Re: During promotion, new master tries to archive same segment twice
  In-Reply-To: <11b405a6-2176-9510-bf5b-ea9c0e860635@pgmasters.net>
  References: <1534364719828@dmwebmail.dmwebmail.chezphil.org> <11b405a6-2176-9510-bf5b-ea9c0e860635@pgmasters.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox