Re: The pg_stop_backup will return one row with three values.

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: The pg_stop_backup will return one row with three values.
Дата
Msg-id YcB7UiwHj0Zk5BhN@paquier.xyz
обсуждение исходный текст
Ответ на Re: The pg_stop_backup will return one row with three values.  (Dave Cramer <davecramer@postgres.rocks>)
Список 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

Вложения

В списке pgsql-docs по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: The pg_stop_backup will return one row with three values.
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: The pg_stop_backup will return one row with three values.