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

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Dave Cramer <davecramer(at)postgres(dot)rocks>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Pg Docs <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: The pg_stop_backup will return one row with three values.
Date: 2021-12-20 13:12:39
Message-ID: CAOBaU_Zdce4QEuxGk_j17UxcrTHpk0kQRqF9nNttgRo+2D4APQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Mon, Dec 20, 2021 at 8:19 PM Dave Cramer <davecramer(at)postgres(dot)rocks> wrote:
>
> On Mon, 20 Dec 2021 at 07:03, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>>
>> On Sun, 2021-12-19 at 21:08 +0000, PG Doc comments form wrote:
>> > Page: https://www.postgresql.org/docs/14/continuous-archiving.html
>> > Description:
>> >
>> > It appears that this may be out of date.
>> >
>> > pg_stop_backup
>> > ---------------------------------------------------------------------------
>> > (0/2000138,"START WAL LOCATION: 0/2000028 (file 000000010000000000000002)+
>> > CHECKPOINT LOCATION: 0/2000060 +
>> > BACKUP METHOD: streamed +
>> > BACKUP FROM: primary +
>> > START TIME: 2021-12-19 13:39:19 EST +
>> > LABEL: label +
>> > START TIMELINE: 1 +
>> > ","")
>> >
>> >
>> > Seems to be returning 7 values ?
>>
>> No, that is one value with 7 newlines in it.
>>
>
> The docs say it returns 3 values ?

It's 3 values, one of them containing a lot of newlines. To make it clearer:

=# select (pg_stop_backup(false, false)).*;
lsn | labelfile
| spcmapfile
-----------+---------------------------------------------------------------+------------
0/9000138 | START WAL LOCATION: 0/9000028 (file 000000010000000000000009)+|
| CHECKPOINT LOCATION: 0/9000060 +|
| BACKUP METHOD: streamed +|
| BACKUP FROM: primary +|
| START TIME: 2021-12-20 21:11:10 CST +|
| LABEL: meh +|
| START TIMELINE: 1 +|
| |
(1 row)

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Dave Cramer 2021-12-20 13:34:32 Re: The pg_stop_backup will return one row with three values.
Previous Message Michael Paquier 2021-12-20 12:47:14 Re: The pg_stop_backup will return one row with three values.