Re: Stale description for pg_basebackup

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Stale description for pg_basebackup
Date: 2021-04-21 02:09:37
Message-ID: 20210421.110937.1028555590855747189.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Wed, 21 Apr 2021 10:43:30 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> At Tue, 20 Apr 2021 13:32:35 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> > Hello.
> >
> > It seems to me that there's a stale description in the documentation
> > of pg_basebackup.
> >
> > https://www.postgresql.org/docs/13/app-pgbasebackup.html
> >
> > > Note that there are some limitations in taking a backup from a standby:
> > ...
> > > If you are using -X none, there is no guarantee that all WAL files
> > > required for the backup are archived at the end of backup.
> >
> > Actually, pg_basebackup waits for the all required files to be
> > archived, which is an established behavior by commit
> > 52f8a59dd9(at)PG10(dot) However, the same commit seems to have forgot to
> > change the doc for pg_basebackup. (The current description is
> > introduced by 9a4d51077c(at)PG10)
> >
> > The attached is a proposal to rewrite it as the following.
> >
> > + If you are using -X none, pg_basebackup may wait for a long time for
> > + all the required WAL files to be archived. In that case, You may need
> > + to call pg_switch_wal() on the primary to complete it sooner.
>
> I forgot to preserve the description about *primary*. It should be as
> the following instead.
>
> + If you are using -X none, there is no guarantee on the primary that
> + all WAL files required for the backup are archived at the end of
> + backup. When the standby is configured as archive_mode=always,
> + pg_basebackup may wait for a long time for all the required WAL files
> + to be archived. In that case, You may need to call pg_switch_wal() on
> + the primary to complete it sooner.

Hmm. Some words need to be qualified. Attached.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
fix_pg_basebackup_doc_v3.patch text/x-patch 1.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-04-21 02:12:50 Re: terminate called after throwing an instance of 'std::bad_alloc'
Previous Message Bharath Rupireddy 2021-04-21 02:04:40 Re: Is it worth to optimize VACUUM/ANALYZE by combining duplicate rel instances into single rel instance?