From: | "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> |
---|---|
To: | 'David Steele' <david(at)pgmasters(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net> |
Subject: | Re: PATCH: Make pg_stop_backup() archive wait optional |
Date: | 2017-03-17 04:47:03 |
Message-ID: | 0A3221C70F24FB45833433255569204D1F6B3F95@G01JPEXMBYT05 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
From: pgsql-hackers-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of David Steele
> The attached patch udpates the docs per your suggestion and has been rebased
> on master at d69fae2.
I made this ready for committer. The patch applied except for catversion.h, the patch content looks good, and the target test passed as follows:
I set archive_command to 'sleep 10'. pg_stop_backup() with archive wait took about 10 seconds, emitting NOTICE messages.
postgres=# select pg_stop_backup(false, true);
NOTICE: pg_stop_backup cleanup done, waiting for required WAL segments to be archived
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
pg_stop_backup
---------------------------------------------------------------------------
(0/B0000F8,"START WAL LOCATION: 0/B000028 (file 00000001000000000000000B)+
CHECKPOINT LOCATION: 0/B000060 +
BACKUP METHOD: streamed +
BACKUP FROM: master +
START TIME: 2017-03-17 13:26:47 JST +
LABEL: a +
","")
(1 row)
pg_stop_backup() without archive wait returned immediately without displaying any NOTICE messages.
postgres=# select pg_stop_backup(false, false);
pg_stop_backup
---------------------------------------------------------------------------
(0/D000130,"START WAL LOCATION: 0/D000028 (file 00000001000000000000000D)+
CHECKPOINT LOCATION: 0/D000060 +
BACKUP METHOD: streamed +
BACKUP FROM: master +
START TIME: 2017-03-17 13:29:46 JST +
LABEL: a +
","")
(1 row)
BTW, does the developer of each feature have to modify the catalog version in catversion.h? It's a bit annoying to see the patch application failure on catversion.h. Isn't it enough to modify the catalog version only when alpha/beta/RC/final versions are released?
Regards
Takayuki Tsunakawa
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2017-03-17 04:54:58 | Re: PATCH: Make pg_stop_backup() archive wait optional |
Previous Message | Tom Lane | 2017-03-17 04:29:43 | Re: [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver |