From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments |
Date: | 2014-12-31 15:32:19 |
Message-ID: | 20141231153219.GE19836@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2014-12-05 16:18:02 +0900, Fujii Masao wrote:
> On Fri, Dec 5, 2014 at 9:28 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > So I think we just need to make pg_basebackup create to .ready
> > files.
>
> s/.ready/.done? If yes, +1.
That unfortunately requires changes to both backend and pg_basebackup to
support fetch and stream modes respectively.
I've attached a preliminary patch for this. I'd appreciate feedback. I
plan to commit it in a couple of days, after some more
testing/rereading.
> > Given that the walreceiver and restore_command already
> > unconditionally do XLogArchiveForceDone() I think we'd follow the
> > established precedent. Arguably it could make sense to archive files
> > again on the standby after a promotion as they aren't guaranteed to have
> > been on the then primary. But we don't have any infrastructure anyway
> > for that and walsender doesn't do so, so it doesn't seem to make any
> > sense to do that for pg_basebackup.
> >
> > Independent from this bug, there's also some debatable behaviour about
> > what happens if a node with a high wal_keep_segments turns on
> > archive_mode. Suddenly all those old files are archived... I think it
> > might be a good idea to simply always create .done files when
> > archive_mode is disabled while a wal segment is finished.
>
> +1
I tend to think that's a master only change. Agreed?
Greetings,
Andres Freund
Attachment | Content-Type | Size |
---|---|---|
0001-Add-pg_string_endswith-as-the-start-of-a-string-help.patch | text/x-patch | 4.6 KB |
0002-Prevent-WAL-files-created-by-pg_basebackup-x-X-from-.patch | text/x-patch | 15.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-12-31 16:07:38 | Re: psql tab completion: fix COMMENT ON ... IS IS IS |
Previous Message | Stephen Frost | 2014-12-31 15:23:25 | Re: Additional role attributes && superuser review |