pg_regress: promptly detect failed postmaster startup

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_regress: promptly detect failed postmaster startup
Date: 2018-12-31 17:29:22
Message-ID: 20181231172922.GA199150@gust.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

When "make check TEMP_CONFIG=<(echo break_me=on)" spawns a postmaster that
fails startup, we detect that with "pg_regress: postmaster did not respond
within 60 seconds". pg_regress has a kill(postmaster_pid, 0) intended to
detect this case faster. Since kill(ZOMBIE-PID, 0) succeeds[1], that test is
ineffective. The fix, attached, is to instead test waitpid(), like pg_ctl's
wait_for_postmaster() does.

[1] Search for "zombie" in
http://pubs.opengroup.org/onlinepubs/9699919799/functions/kill.html

Attachment Content-Type Size
pg_regress-dead-postmaster-v1.patch text/x-diff 536 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2018-12-31 17:33:30 Re: [HACKERS] proposal: schema variables
Previous Message Noah Misch 2018-12-31 17:25:51 Re: Is MinMaxExpr really leakproof?