Re: pgsql: Add test for postmaster crash restarts.

From: Andres Freund <andres(at)anarazel(dot)de>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Add test for postmaster crash restarts.
Date: 2017-09-30 22:44:24
Message-ID: 20170930224424.ud5ilchmclbl5y5n@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 2017-09-30 15:27:12 -0700, Andres Freund wrote:
> On 2017-09-30 18:21:33 -0400, Andrew Dunstan wrote:
> >
> > [re-adding commiters which I inadvertently left off]
> >
> >
> > On 09/30/2017 06:10 PM, Andres Freund wrote:
> > >
> > >
> > >> I was just looking at this. Why aren't we using "pg_ctl kill" to
> > >> terminate the backend? That's supposed to be portable.
> > > Because pg_ctl can't do that for any process but postmaster, no? The
> > > test is supposed to find issues with backend death (and has
> > > defficiencies in error reporting already, and would have caught a bug
> > > I'd introduced previously).
>
> > No, I don't think so. That's not what the docs say. That's why you give
> > it a pid argument" "pg_ctl kill signal_name process_id"
>
> Oh, cool. Didn't know that one. So the answer is:
> "Because Andres doesn't know squat.".
>
> 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)?

Could you perhaps test whether windows likes things after the following
patch? I don't think the kill_kill guarantees are really needed here,
so we might even be able to allow this on msvc.

Greetings,

Andres Freund

Attachment Content-Type Size
windowsify.patch text/x-diff 3.6 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2017-10-01 01:25:30 Re: [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple
Previous Message Andres Freund 2017-09-30 22:27:12 Re: pgsql: Add test for postmaster crash restarts.

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2017-10-01 01:25:30 Re: [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple
Previous Message Andres Freund 2017-09-30 22:27:12 Re: pgsql: Add test for postmaster crash restarts.