Refactoring DetermineSleepTime()
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-08T09:21:53Z
Lists: pgsql-hackers
Attachments
- 0001-Refactor-the-postmaster-s-periodic-job-scheduling.patch (text/x-patch) patch 0001
Hi, DetermineSleepTime() came with background workers (commit da07a1e8). While working on I/O workers, which now also have time-scheduled postmaster duties to support io_worker_launch_interval, I wondered if it might be time to refactor it and make such things follow a standard pattern, including the much more ancient SIGKILL and the lockfile/socket stuff. Sketch patch attached. Something similar happened to walreceiver.c.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Background worker processes
- da07a1e85651 9.3.0 cited