pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Dave Cramer <davecramer@postgres.rocks>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Pg Docs <pgsql-docs@lists.postgresql.org>
Subject: Re: The pg_stop_backup will return one row with three values.
Date: Mon, 20 Dec 2021 21:47:14 +0900
Message-ID: <YcB7UiwHj0Zk5BhN@paquier.xyz> (raw)
In-Reply-To: <CADK3HH+-H-h57FBFJ+S-yhCM7JX8eCgWxNghzpAeaMdLTDdyxg@mail.gmail.com>
References: <163994808959.26053.3206807775509915477@wrigleys.postgresql.org>
	<a3b84adc4f67542223779a2ca0c6f3cf933996bf.camel@cybertec.at>
	<CADK3HH+-H-h57FBFJ+S-yhCM7JX8eCgWxNghzpAeaMdLTDdyxg@mail.gmail.com>

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

Attachments:

  [application/pgp-signature] signature.asc (832B, ../YcB7UiwHj0Zk5BhN@paquier.xyz/2-signature.asc)
  download

view thread (6+ messages)  latest in thread

Message-ID: <YcB7UiwHj0Zk5BhN@paquier.xyz>
Permalink:  ../YcB7UiwHj0Zk5BhN@paquier.xyz/
Also on:    postgresql.org/message-id/YcB7UiwHj0Zk5BhN@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: michael@paquier.xyz, davecramer@postgres.rocks, laurenz.albe@cybertec.at, pgsql-docs@lists.postgresql.org
  Subject: Re: The pg_stop_backup will return one row with three values.
  In-Reply-To: <YcB7UiwHj0Zk5BhN@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox