Sub-millisecond [autovacuum_]vacuum_cost_delay broken
Melanie Plageman <melanieplageman@gmail.com>
From: Melanie Plageman <melanieplageman@gmail.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Stephen Frost <sfrost@snowman.net>, Thomas Munro <thomas.munro@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-03-09T21:26:02Z
Lists: pgsql-hackers
Hi, I think that 4753ef37e0ed undid the work caf626b2c did to support sub-millisecond delays for vacuum and autovacuum. After 4753ef37e0ed, vacuum_delay_point()'s local variable msec is a double which, after being passed to WaitLatch() as timeout, which is a long, ends up being 0, so we don't end up waiting AFAICT. When I set [autovacuum_]vacuum_delay_point to 0.5, SHOW will report that it is 500us, but WaitLatch() is still getting 0 as timeout. - Melanie
Commits
-
Use nanosleep() to implement pg_usleep().
- a948e49e2ef1 16.0 landed
-
Update obsolete comment about pg_usleep() accuracy.
- e4da2a44c17a 16.0 landed
-
Fix fractional vacuum_cost_delay.
- 2bef57ee8b38 14.8 landed
- d9c9c43af5c8 15.3 landed
- 720de00af49d 16.0 landed