mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
Don't write to postgres's stdin in shmem startup failure test
The single-user test expects postgres to fail during startup, before processing any queries. Sending the preceding test's queries can race with that exit and make IPC::Run abort on a broken pipe. To fix, pass empty input instead. Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com> Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://www.postgresql.org/message-id/e87c8fef-e254-441e-b889-bbcbd5afea7f@gmail.com Backpatch-through: 19
This commit is contained in:
@@ -215,7 +215,7 @@ SELECT test_shmem_register('test_shmem after startup', -1, 3);
|
||||
'-c' => 'test_shmem.area_size=-1',
|
||||
'postgres'
|
||||
],
|
||||
'<' => \$queries,
|
||||
'<' => \'',
|
||||
'2>' => \$startup_stderr);
|
||||
ok(!$result,
|
||||
"unknown-size request during single-user startup is rejected");
|
||||
|
||||
Reference in New Issue
Block a user