From: | Fujii Masao <fujii(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix issue with WAL archiving in standby. |
Date: | 2021-09-09 15:01:35 |
Message-ID: | E1mOLYV-0000wT-08@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix issue with WAL archiving in standby.
Previously, walreceiver always closed the currently-opened WAL segment
and created its archive notification file, after it finished writing
the current segment up and received any WAL data that should be
written into the next segment. If walreceiver exited just before
any WAL data in the next segment arrived at standby, it did not
create the archive notification file of the current segment
even though that's known completed. This behavior could cause
WAL archiving of the segment to be delayed until subsequent
restartpoints or checkpoints created its notification file.
To fix the issue, this commit changes walreceiver so that it creates
an archive notification file of a current WAL segment immediately
if that's known completed before receiving next WAL data.
Back-patch to all supported branches.
Reported-by: Kyotaro Horiguchi
Author: Fujii Masao
Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/20200630.165503.1465894182551545886.horikyota.ntt@gmail.com
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/4665352543d73a182a8fe638065430ef7db8b2b9
Modified Files
--------------
src/backend/replication/walreceiver.c | 98 ++++++++++++++++++++++-------------
1 file changed, 62 insertions(+), 36 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2021-09-09 15:01:47 | pgsql: Fix issue with WAL archiving in standby. |
Previous Message | Fujii Masao | 2021-09-09 15:01:23 | pgsql: Fix issue with WAL archiving in standby. |