From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | spam_from_pgsql_lists(at)chezphil(dot)org, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #15335: Documentation is wrong about archive_command and existing files |
Date: | 2018-08-18 14:23:34 |
Message-ID: | CAMkU=1x9pjj410OD3gTzcpk7+xsBxce6xMMR7MOdn8-K_30FbA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Thu, Aug 16, 2018 at 12:10 PM, PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 15335
> Logged by: Phil Endecott
> Email address: spam_from_pgsql_lists(at)chezphil(dot)org
> PostgreSQL version: 9.6.10
> Operating system: Debian Stretch
> Description:
>
> The docs in section 25.3.1 say that archive_command should check if the
> target file already exists and fail in that case. It seems that this is
> not
> entirely true; the command should succeed if the target file already exists
> and its content is the same as the source.
> This is explicitly mentioned in section 26.2.9 for the case of cascaded
> replication with a shared archive, but I understand that this is actually
> needed in all cases. I encountered this during a failed attempt at
> promotion, but there are likely to be other cases. Quoting David Steele
> from the -general mailing list:
>
> "Duplicate WAL is possible in *all* cases. A trivial example is that
> Postgres calls archive_command and it succeeds but an error happens (e.g.
> network) right before Postgres is notified. It will wait a bit and try the
> same WAL segment again."
>
Sure, that is possible. But it is also possible that the network error
caused the file to be short, but an identical prefix of what it is supposed
to be. Or maybe it was corrupted by the error, and so not even an
identical prefix. The possibilities are endless, and an example cannot
cover all of them while still usefully serving as an example. There are
canned systems for handling this more thoroughly, and you should look into
using one of them.
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Phil Endecott | 2018-08-18 16:51:44 | Re: BUG #15335: Documentation is wrong about archive_command and existing files |
Previous Message | Michael Paquier | 2018-08-18 08:15:30 | Re: BUG #15331: Please check if recovery.conf can be renamed |