1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00

Make after-startup shmem failure test reliable

The test expects a 128 kB request to exceed the shared memory 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.

Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Reported-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/rpkhzrrmo7qiz7rr3qlufksb2oci33wcg3ao75le7dqindgoif@6yozkjwb6bdf
Backpatch-through: 19
This commit is contained in:
Andres Freund
2026-09-01 10:32:41 -04:00
parent ef67d599ef
commit 61e64cb19a

View File

@@ -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);