Stale description for pg_basebackup

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2021-04-20T04:32:35Z
Lists: pgsql-hackers

Attachments

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@PG10. However, the same commit seems to have forgot to
change the doc for pg_basebackup. (The current description is
introduced by 9a4d51077c@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.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center

Commits

  1. doc: Fix obsolete description about pg_basebackup.

  2. Make pg_stop_backup's wait_for_archive flag work on standbys.