diff options
author | Álvaro Herrera <alvherre@alvh.no-ip.org> | 2024-12-03 17:50:57 +0100 |
---|---|---|
committer | Álvaro Herrera <alvherre@alvh.no-ip.org> | 2024-12-03 17:50:57 +0100 |
commit | 3c5f9f12c807760f6d512957a863113b07a79dcb (patch) | |
tree | 9321fbfdb58db8bb47f626fc7318e0802c058b6e /src/backend/tcop/postgres.c | |
parent | 1e5ef3a2a17974f574b90b86f491d74e32615987 (diff) | |
download | postgresql-3c5f9f12c807760f6d512957a863113b07a79dcb.tar.gz postgresql-3c5f9f12c807760f6d512957a863113b07a79dcb.zip |
Fix synchronized_standby_slots GUC check hook
The validate_sync_standby_slots subroutine requires an LWLock, so it
cannot run in processes without PGPROC; skip it there to avoid a crash.
This replaces the current test for ReplicationSlotCtl being not null,
which appears to be a solution for the same problem but less general.
I also rewrote a related comment that mentioned ReplicationSlotCtl in
StandbySlotsHaveCaughtup.
This code came in with commit bf279ddd1c28; backpatch to 17.
Reported-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Zhijie Hou <houzj.fnst@fujitsu.com>
Discussion: https://postgr.es/m/202411281216.sutbxtr6idnn@alvherre.pgsql
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions