From 75e7ecc252fc48ea57b08a6eb8d349d7e522d339 Mon Sep 17 00:00:00 2001 From: Ayush Tiwari Date: Sat, 29 Aug 2026 08:22:39 +0000 Subject: [PATCH v1] Make after-startup shmem failure test reliable The test expects a 128 kB request to exceed the shared memory left available after startup. Huge pages can round up the main shared memory segment enough for that request to succeed, defeating the test. Disable huge pages for the allocation-failure phase so that it exercises the intended error path independently of shared memory segment rounding. Reported-by: Andres Freund Discussion: https://postgr.es/m/rpkhzrrmo7qiz7rr3qlufksb2oci33wcg3ao75le7dqindgoif@6yozkjwb6bdf Backpatch-through: 19 --- src/test/modules/test_shmem/t/001_late_shmem_alloc.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/modules/test_shmem/t/001_late_shmem_alloc.pl b/src/test/modules/test_shmem/t/001_late_shmem_alloc.pl index a7126ebce3f..9432b42181b 100644 --- a/src/test/modules/test_shmem/t/001_late_shmem_alloc.pl +++ b/src/test/modules/test_shmem/t/001_late_shmem_alloc.pl @@ -125,6 +125,9 @@ SKIP: ### # Test "out of shared memory" in an after-startup request ### +# Huge pages round up the main shared memory segment, which can leave more +# unused space than the request below. Disable them to make the test reliable. +$node->append_conf('postgresql.conf', 'huge_pages = off'); $node->start; my $session = $node->background_psql('postgres', on_error_stop => 0); -- 2.43.0