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

From: David Steele <david(at)pgmasters(dot)net>
To: Phil Endecott <spam_from_pgsql_lists(at)chezphil(dot)org>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: During promotion, new master tries to archive same segment twice
Date: 2018-08-15 20:41:27
Message-ID: 11b405a6-2176-9510-bf5b-ea9c0e860635@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)pgmasters(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Evan Rempel 2018-08-15 20:52:43 Re: How to revoke privileged from PostgreSQL's superuser
Previous Message Don Seiler 2018-08-15 20:34:33 Re: Odd Row Estimates in Query Plan (rows=75)