| From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Refactoring DetermineSleepTime() |
| Date: | 2026-04-08 09:21:53 |
| Message-ID: | CA+hUKGLqkc8XF780bBtFTkVgGgSRZ7qVEaHWRec4Auv+sx-48g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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.
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Refactor-the-postmaster-s-periodic-job-scheduling.patch | text/x-patch | 14.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nisha Moond | 2026-04-08 09:45:10 | Re: Use SIGTERM instead of SIGUSR1 for slotsync worker to exit during promotion? |
| Previous Message | Soumya S Murali | 2026-04-08 09:17:28 | Re: Fix bug with accessing to temporary tables of other sessions |