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

2015-10-13 Thread Tom Lane
Michael Paquier writes: > On Tue, Oct 13, 2015 at 7:41 AM, Tom Lane wrote: >> I'm not sure if this will completely fix our problems with "pg_ctl start" >> related buildfarm failures on very slow critters. It does get rid of the >> hard wired

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

2015-10-13 Thread Michael Paquier
On Tue, Oct 13, 2015 at 7:41 AM, Tom Lane wrote: > So there's still something to be desired on Windows; but it's still > better than before in that we can reliably detect child process exit > instead of having to use the five-second heuristic. And of course on > Unix this is

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

2015-10-12 Thread Tom Lane
Michael Paquier writes: >> On Wed, Oct 7, 2015 at 11:52 PM, Tom Lane wrote: >>> I think there is still room to salvage something without fully rewriting >>> the postmaster invocation logic to avoid using CMD, because it's still >>> true that

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

2015-10-09 Thread Tom Lane
Alvaro Herrera writes: > I wonder if you are interested in rewriting this whole thing to not use > cmd.exe at all, which as I understand is just about output redirection. FWIW, I have little interest in going there, because I'm afraid that getting it to be

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

2015-10-09 Thread Alvaro Herrera
Michael Paquier wrote: > > That would be WaitForSingleObject(handle, ms_timeout) == > > WAIT_OBJECT_0, no? The handle should be picked up from > > CreateRestrictedProcess, and I think that CloseHandle should not be > > called on pi.hProcess if we are going to wait for it afterwards. > >

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

2015-10-08 Thread Michael Paquier
On Wed, Oct 7, 2015 at 11:52 PM, Tom Lane wrote: > Michael Paquier writes: >> On Sat, Sep 26, 2015 at 9:12 AM, Tom Lane wrote: >>> So the attached modified patch adjusts the PID-match logic and some >>> comments, but is otherwise what I posted

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

2015-10-08 Thread Michael Paquier
On Thu, Oct 8, 2015 at 3:09 PM, Michael Paquier wrote: > On Wed, Oct 7, 2015 at 11:52 PM, Tom Lane wrote: >> Michael Paquier writes: >>> On Sat, Sep 26, 2015 at 9:12 AM, Tom Lane wrote: So the attached modified patch

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

2015-10-07 Thread Michael Paquier
On Sat, Sep 26, 2015 at 9:12 AM, Tom Lane wrote: > So the attached modified patch adjusts the PID-match logic and some > comments, but is otherwise what I posted before. I believe that this > might actually work on Windows, but I have no way to test it. Someone > please try that? (Don't forget

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

2015-10-07 Thread Tom Lane
Michael Paquier writes: > On Sat, Sep 26, 2015 at 9:12 AM, Tom Lane wrote: >> So the attached modified patch adjusts the PID-match logic and some >> comments, but is otherwise what I posted before. I believe that this >> might actually work on Windows, but I have no

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

2015-10-07 Thread Tom Lane
Michael Paquier writes: > On Sat, Sep 26, 2015 at 9:12 AM, Tom Lane wrote: >> So the attached modified patch adjusts the PID-match logic and some >> comments, but is otherwise what I posted before. I believe that this >> might actually work on Windows, but I have no

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

2015-10-06 Thread Michael Paquier
On Wed, Oct 7, 2015 at 6:44 AM, Tom Lane wrote: > I wrote: >> So the attached modified patch adjusts the PID-match logic and some >> comments, but is otherwise what I posted before. I believe that this >> might actually work on Windows, but I have no way to test it. Someone

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

2015-10-06 Thread Tom Lane
I wrote: > So the attached modified patch adjusts the PID-match logic and some > comments, but is otherwise what I posted before. I believe that this > might actually work on Windows, but I have no way to test it. Someone > please try that? (Don't forget to test the service-start path, too.)

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

2015-10-06 Thread Michael Paquier
On Wed, Oct 7, 2015 at 7:05 AM, Michael Paquier wrote: > On Wed, Oct 7, 2015 at 6:44 AM, Tom Lane wrote: >> I wrote: >>> So the attached modified patch adjusts the PID-match logic and some >>> comments, but is otherwise what I posted before. I

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

2015-09-25 Thread Tom Lane
I wrote: > 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

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

2015-09-05 Thread Noah Misch
On Fri, Sep 04, 2015 at 10:54:51PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Thu, Sep 03, 2015 at 03:31:06PM -0400, Tom Lane wrote: > >>> This is the first time I've seen an indication that the > >>> start_postmaster change mentioned in the comment is actually

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

2015-09-05 Thread Noah Misch
On Sat, Sep 05, 2015 at 10:22:59PM -0400, Tom Lane wrote: > Noah Misch writes: > > kill() adds nothing when dealing with a pg_ctl child. waitpid() is enough. > > The kill() coding works on Windows (I believe); waitpid() not so much. Windows has the concept under a different

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

2015-09-05 Thread Tom Lane
Noah Misch writes: > On Sat, Sep 05, 2015 at 10:22:59PM -0400, Tom Lane wrote: >> The kill() coding works on Windows (I believe); waitpid() not so much. > Windows has the concept under a different name. See postmaster.c. Well, if someone else wants to code and test that,

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

2015-09-05 Thread Tom Lane
Noah Misch writes: > kill() adds nothing when dealing with a pg_ctl child. waitpid() is enough. The kill() coding works on Windows (I believe); waitpid() not so much. regards, tom lane -- Sent via pgsql-hackers mailing list

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

2015-09-04 Thread Tom Lane
Noah Misch writes: > On Thu, Sep 03, 2015 at 03:31:06PM -0400, Tom Lane wrote: >>> 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

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

2015-09-04 Thread Noah Misch
On Thu, Sep 03, 2015 at 03:31:06PM -0400, Tom Lane wrote: > I wrote: > > 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 scratched my head awhile without

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

2015-09-03 Thread Tom Lane
I wrote: > Andres Freund 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 >

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

2015-09-03 Thread Tom Lane
Andrew Dunstan writes: > 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.

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

2015-09-03 Thread Alvaro Herrera
Tom Lane wrote: > Andrew Dunstan writes: > > 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

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

2015-09-03 Thread Andrew Dunstan
On 09/03/2015 03:31 PM, Tom Lane wrote: I wrote: Andres Freund 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

[HACKERS] pg_ctl/pg_rewind tests vs. slow AIX buildfarm members

2015-09-03 Thread Noah Misch
My AIX buildfarm members have failed the BinInstallCheck step on and off since inception. It became more frequent when I added animals sungazer and tern alongside the older hornet and mandrill. The animals share a machine with each other and with dozens of other developers. I setpriority() the

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

2015-09-03 Thread Andres Freund
On 2015-09-03 02:25:00 -0400, Noah Misch wrote: > --- a/src/bin/pg_ctl/t/001_start_stop.pl > +++ b/src/bin/pg_ctl/t/001_start_stop.pl > @@ -35,6 +35,7 @@ close CONF; > command_ok([ 'pg_ctl', 'start', '-D', "$tempdir/data", '-w' ], > 'pg_ctl start -w'); > -command_ok([ 'pg_ctl', 'start',

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

2015-09-03 Thread Tom Lane
Andres Freund writes: > On 2015-09-03 02:25:00 -0400, Noah Misch wrote: >> --- a/src/bin/pg_ctl/t/001_start_stop.pl >> +++ b/src/bin/pg_ctl/t/001_start_stop.pl >> @@ -35,6 +35,7 @@ close CONF; >> command_ok([ 'pg_ctl', 'start', '-D', "$tempdir/data", '-w' ], >> 'pg_ctl start