pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Try to avoid semaphore-related test failures on NetBSD/OpenBSD. 2+ messages / 1 participants [nested] [flat]
* pgsql: Try to avoid semaphore-related test failures on NetBSD/OpenBSD. @ 2024-12-23 21:46 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2024-12-23 21:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Try to avoid semaphore-related test failures on NetBSD/OpenBSD. These two platforms have a remarkably tight default limit on the number of SysV semaphores in the system: SEMMNS is only 60 out-of-the-box. Unless manual action is taken to raise that, we'll only be able to allocate 3 sets of 16 usable semaphores each, leading to initdb setting max_connections to just 20. That's problematic because the core regression tests expect to be able to launch 20 concurrent sessions, leaving us with no headroom. This seems to be the cause of intermittent buildfarm failures on some machines. While there's no getting around the fact that you'd better raise SEMMNS for production use on these platforms, it does seem desirable for "make check" to pass reliably without that. We can make that happen, at least for awhile longer, with two small changes: * Change sysv_sema.c's SEMAS_PER_SET to 19, so that we can eat up all of the available semas not just most of them. * Change initdb to make the smallest max_connections value it will consider be 25 not 20. As of HEAD this will leave us with four free semaphores (using the default values for other relevant parameters such as max_wal_senders). So we won't need to consider this again until we've invented five more background processes. Maybe by then we can switch both these platforms to some other semaphore API. For the moment, do this only in master; there've not been field complaints that might justify a back-patch. Discussion: https://postgr.es/m/db2773a2-aca0-43d0-99c1-060efcd9954e@gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/38da053463bef32adf563ddee5277d16d2b6c5af Modified Files -------------- doc/src/sgml/runtime.sgml | 16 ++++++++-------- src/backend/port/sysv_sema.c | 8 +++++++- src/bin/initdb/initdb.c | 2 +- 3 files changed, 16 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Try to avoid semaphore-related test failures on NetBSD/OpenBSD. @ 2024-12-28 17:30 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2024-12-28 17:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Try to avoid semaphore-related test failures on NetBSD/OpenBSD. These two platforms have a remarkably tight default limit on the number of SysV semaphores in the system: SEMMNS is only 60 out-of-the-box. Unless manual action is taken to raise that, we'll only be able to allocate 3 sets of 16 usable semaphores each, leading to initdb setting max_connections to just 20. That's problematic because the core regression tests expect to be able to launch 20 concurrent sessions, leaving us with no headroom. This seems to be the cause of intermittent buildfarm failures on some machines. While there's no getting around the fact that you'd better raise SEMMNS for production use on these platforms, it does seem desirable for "make check" to pass reliably without that. We can make that happen, at least for awhile longer, with two small changes: * Change sysv_sema.c's SEMAS_PER_SET to 19, so that we can eat up all of the available semas not just most of them. * Change initdb to make the smallest max_connections value it will consider be 25 not 20. This is a back-patch of recent HEAD commit 38da05346 into v17. The motivation for doing this now is that an upcoming bug-fix patch will give the new-in-17 slotsync worker process its own reserved PGPROC and hence also semaphore. With that patch but without this change, v17 would fail to start at all under the default SEMMNS on these platforms. Discussion: https://postgr.es/m/db2773a2-aca0-43d0-99c1-060efcd9954e@gmail.com Discussion: https://postgr.es/m/1808397.1735156190@sss.pgh.pa.us Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a46311ed7214741ad0d38893da4285b2c2b468ad Modified Files -------------- doc/src/sgml/runtime.sgml | 14 +++++++------- src/backend/port/sysv_sema.c | 8 +++++++- src/bin/initdb/initdb.c | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-12-28 17:30 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-12-23 21:46 pgsql: Try to avoid semaphore-related test failures on NetBSD/OpenBSD. Tom Lane <tgl@sss.pgh.pa.us> 2024-12-28 17:30 pgsql: Try to avoid semaphore-related test failures on NetBSD/OpenBSD. Tom Lane <tgl@sss.pgh.pa.us>
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