Re: The pg_stop_backup will return one row with three values. - Mailing list pgsql-docs

From Michael Paquier
Subject Re: The pg_stop_backup will return one row with three values.
Date
Msg-id YcB7UiwHj0Zk5BhN@paquier.xyz
Whole thread Raw
In response to Re: The pg_stop_backup will return one row with three values.  (Dave Cramer <davecramer@postgres.rocks>)
List pgsql-docs
On Mon, Dec 20, 2021 at 07:19:32AM -0500, Dave Cramer wrote:
> The docs say it returns 3 values ?

They do.  Here is the relevant part:
https://www.postgresql.org/docs/devel/functions-admin.html#FUNCTIONS-ADMIN-BACKUP
"The result of the function is a single record. The lsn column holds
the backup's ending write-ahead log location (which again can be
ignored). The second and third columns are NULL when ending an
exclusive backup; after a non-exclusive backup they hold the desired
contents of the label and tablespace map files."

For exclusive backups, where pg_stop_backup() is used without an
argument, 1 row is returned with the LSN marking the end of the
backup.  When pg_stop_backup(true) is used, you would get one row with
three attributes: the end LSN, the label file as NULL and a tablespace
map as NULL.

For non-exclusive backups, pg_stop_backup(false) returns those three
fields, all of them being not NULL.  pg_stop_backup() without an
argument cannot be used for non-exclusive backups.
--
Michael

Attachment

pgsql-docs by date:

Previous
From: Dave Cramer
Date:
Subject: Re: The pg_stop_backup will return one row with three values.
Next
From: Julien Rouhaud
Date:
Subject: Re: The pg_stop_backup will return one row with three values.