diff options
author | Michael Paquier <michael@paquier.xyz> | 2021-09-18 10:42:13 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2021-09-18 10:42:13 +0900 |
commit | 499c9b1266395c5e4c22bd7b2cbdb7f5a64ea4fa (patch) | |
tree | ff047ff10464397278a338d4cbf6b8715481df4f /src/backend/tcop/postgres.c | |
parent | d7897abf9e0071946e9e4e8efd2d4463607c04de (diff) | |
download | postgresql-499c9b1266395c5e4c22bd7b2cbdb7f5a64ea4fa.tar.gz postgresql-499c9b1266395c5e4c22bd7b2cbdb7f5a64ea4fa.zip |
Improve some check logic in pg_receivewal
The following things are improved:
- Fetch the system identifier from the source server before any
WAL streaming loop. This triggers extra checks to make sure that
pg_receivewal is still connected to a server with the same system ID
with a correct timeline.
- Switch umask() (for file creation mode mask) and RetrieveWalSegSize()
(to fetch the size of WAL segments) a bit later before the initial
stream attempt. If the connection was done with a database,
pg_receivewal would fail but those commands were still executed, which
was a waste. The slot creation and drop are now done before retrieving
the segment size.
Author: Bharath Rupireddy
Reviewed-by: Ronan Dunklau, Michael Paquier
Discussion: https://postgr.es/m/CALj2ACX00YYeyBfoi55Cy=NrP-FcfMgiYYx1qRUEib3yjCVoaA@mail.gmail.com
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions