Re: pg_regress not waiting for postmaster to stop

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_regress not waiting for postmaster to stop
Date: 2015-06-19 14:57:47
Message-ID: CA+TgmoZn-8DcZ5EvQd=PJQeGPLeATpv7GjJBy9TG+4FOoU8ahA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 19, 2015 at 2:33 AM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> In pg_regress.c, there is the following code:
> static void
> stop_postmaster(void)
> {
> if (postmaster_running)
> {
> /* We use pg_ctl to issue the kill and wait for stop */
> char buf[MAXPGPATH * 2];
> int r;
>
> /* On Windows, system() seems not to force fflush, so... */
> fflush(stdout);
> fflush(stderr);
>
> snprintf(buf, sizeof(buf),
> "\"%s%spg_ctl\" stop -D \"%s/data\"
> -w -s -m fast",
> bindir ? bindir : "",
> bindir ? "/" : "",
> temp_instance);
>
> Except if I am missing something, the comment mentions that we should
> wait for the stop but there is no -w switch in the command of pg_ctl.
> Doesn't the patch attached make sense?

Do we need to wait, or is failing to wait harmless?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-06-19 14:58:00 Re: pg_regress not waiting for postmaster to stop
Previous Message Robert Haas 2015-06-19 14:52:38 pgsql: Change TAP test framework to not rely on having a chmod executab