Re: [bug fix] "pg_ctl stop" times out when it should respond quickly

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: MauMau <maumau307(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bug fix] "pg_ctl stop" times out when it should respond quickly
Date: 2014-02-19 17:35:16
Message-ID: CA+TgmobP2n62fBjmRdt=-iYXMnhF9GwpUe2p3OkjB0oYbn=gHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 17, 2014 at 11:29 AM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> The pg_regress part is ugly. However, pg_regress is doing something
> unusual when starting postmaster itself, so the ugly coding to stop it
> seems to match. If we wanted to avoid the ugliness here, the right fix
> would be to use pg_ctl to start postmaster as well as to stop it.

I wonder if this would change the behavior in cases where we hit ^C
during the regression tests. Right now I think that kills the
postmaster as well as pg_regress, but if we used pg_ctl, it might not,
because pg_regress uses fork()+exec(), but pg_ctl uses system() to
launch a shell which is in turn instructed to background the
postmaster.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-02-19 17:47:40 Re: should we add a XLogRecPtr/LSN SQL type?
Previous Message Robert Haas 2014-02-19 16:58:17 Re: Description for pg_replslot in docs