Re: pgsql: Add test for postmaster crash restarts.
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-committers <pgsql-committers@postgresql.org>
Date: 2017-10-01T02:32:14Z
Lists: pgsql-hackers
Hi,
On 2017-09-30 22:28:39 -0400, Andrew Dunstan wrote:
> >> But even after fixing that, there unfortunately is:
> >>
> >> static void
> >> set_sig(char *signame)
> >> {
> >> …
> >> #if 0
> >> /* probably should NOT provide SIGKILL */
> >> else if (strcmp(signame, "KILL") == 0)
> >> sig = SIGKILL;
> >> #endif
> >>
> >> I'm unclear on what that provision is achieving? If you can kill with
> >> pg_ctl you can do other nasty stuff too (like just use kill instead of
> >> pg_ctl)?
>
>
> I put it in when we rewrote pg_ctl in C many years ago, possibly out of
> a superabundance of caution. I agree it's worth revisiting. I think the
> idea was that there's a difference between an ordinary footgun and an
> officially sanctioned footgun :-)
Heh. I'm inclined to take it out. We could add a --use-the-force-luke
type parameter, but it doesn't seem worth it.
> Haven't tested on MSVC but with this patch it passes on jacana (mingw).
Yay! Thanks for testing.
Greetings,
Andres Freund
Commits
-
Allow pg_ctl kill to send SIGKILL.
- 2e83db3ad2da 11.0 landed
-
Try to make crash restart test work on windows.
- 784905795f8a 11.0 landed
-
Make new crash restart test a bit more robust.
- 1910353675bd 11.0 landed
-
Add test for postmaster crash restarts.
- a1924a4ea293 11.0 cited