Re: pg_ctl/pg_rewind tests vs. slow AIX buildfarm members

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Noah Misch <noah(at)leadboat(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl/pg_rewind tests vs. slow AIX buildfarm members
Date: 2015-09-03 20:02:43
Message-ID: 55E8A763.9050402@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/03/2015 03:31 PM, Tom Lane wrote:
> I wrote:
>> Andres Freund <andres(at)anarazel(dot)de> writes:
>>> I'don't like adding a couple seconds of test runtime for the benefit of
>>> very slow platforms.
>> Me either. This is the first time I've seen an indication that the
>> start_postmaster change mentioned in the comment is actually important
>> for production use, rather than just being cleanup. I think we ought
>> to just fix it. I'm willing to take care of the Unix side if someone
>> will explain how to change the Windows side.
> Attached is a draft patch for this. I think it's fine for Unix (unless
> someone wants to object to relying on "/bin/sh -c"), but I have no idea
> whether it works for Windows. The main risk is that if CMD.EXE runs
> the postmaster as a subprocess rather than overlaying itself a la shell
> "exec", the PID we'd get back would apply only to CMD.EXE not to the
> eventual postmaster. If so, I do not know how to fix that, or whether
> it's fixable at all.
>
> Note that this makes the test case in question fail reliably, which is
> reasonable behavior IMO so I just changed the test.
>
> If this does (or can be made to) work on Windows, I'd propose applying
> it back to 9.2, where the current coding came in.

There is no equivalent of execl, nor a cmd.exe exquivalent of the
shell's exec. But surely the equivalent of the fork/execl you're doing
here would be a simple CreateProcess(). I don't see why you need a shell
in the middle on Windows at all.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-09-03 20:06:59 Re: On-demand running query plans using auto_explain and signals
Previous Message Tom Lane 2015-09-03 19:34:36 Re: PG_CATCH used without PG_RETHROW