pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix fractional vacuum_cost_delay.
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix fractional vacuum_cost_delay.
@ 2023-03-15 01:09  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Thomas Munro @ 2023-03-15 01:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/720de00af49d3d46cb5c9b4753b52215f5029ac9

Modified Files
--------------
src/backend/commands/vacuum.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix fractional vacuum_cost_delay.
@ 2023-03-15 01:10  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Thomas Munro @ 2023-03-15 01:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d9c9c43af5c8d873f46a4b0c969a68deddd010b6

Modified Files
--------------
src/backend/commands/vacuum.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix fractional vacuum_cost_delay.
@ 2023-03-15 01:10  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Thomas Munro @ 2023-03-15 01:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2bef57ee8b38ee7fdbad3fb38b1f8ed31adb381b

Modified Files
--------------
src/backend/commands/vacuum.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2023-03-15 01:10 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 01:09 pgsql: Fix fractional vacuum_cost_delay. Thomas Munro <tmunro@postgresql.org>
2023-03-15 01:10 pgsql: Fix fractional vacuum_cost_delay. Thomas Munro <tmunro@postgresql.org>
2023-03-15 01:10 pgsql: Fix fractional vacuum_cost_delay. Thomas Munro <tmunro@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox