aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execReplication.c
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2023-03-15 13:57:00 +1300
committerThomas Munro <tmunro@postgresql.org>2023-03-15 13:58:18 +1300
commit720de00af49d3d46cb5c9b4753b52215f5029ac9 (patch)
treeb146fe67cf0b6e1c92d61d1448037582206a3262 /src/backend/executor/execReplication.c
parentd41a178b3a7ac0c2ca16f70129899ddabc2ce468 (diff)
downloadpostgresql-720de00af49d3d46cb5c9b4753b52215f5029ac9.tar.gz
postgresql-720de00af49d3d46cb5c9b4753b52215f5029ac9.zip
Fix fractional vacuum_cost_delay.
Commit 4753ef37 changed vacuum_delay_point() to use the WaitLatch() API, to fix the problem that vacuum could keep running for a very long time after the postmaster died. Unfortunately, that broke commit caf626b2's support for fractional vacuum_cost_delay, which shipped in PostgreSQL 12. WaitLatch() works in whole milliseconds. For now, revert the change from commit 4753ef37, but add an explicit check for postmaster death. That's an extra system call on systems other than Linux and FreeBSD, but that overhead doesn't matter much considering that we willingly went to sleep and woke up again. (In later work, we might add higher resolution timeouts to the latch API so that we could do this with our standard programming pattern, but that wouldn't be back-patched.) Back-patch to 14, where commit 4753ef37 arrived. Reported-by: Melanie Plageman <melanieplageman@gmail.com> Discussion: https://postgr.es/m/CAAKRu_b-q0hXCBUCAATh0Z4Zi6UkiC0k2DFgoD3nC-r3SkR3tg%40mail.gmail.com
Diffstat (limited to 'src/backend/executor/execReplication.c')
0 files changed, 0 insertions, 0 deletions