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

From: Michael Paquier <michael(dot)paquier(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>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bug fix] "pg_ctl stop" times out when it should respond quickly
Date: 2014-02-18 04:12:08
Message-ID: CAB7nPqRKSCfj9dYpCgGfNqaRXYXNi9RhRJOrP62bVyAAmtXXAQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 18, 2014 at 1:29 AM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> MauMau escribió:
> 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. But
> that'd come at a price, because we would need more ugly code to figure
> out postmaster's PID. All in all, the compromise proposed by this patch
> seems acceptable. If we really wanted to make all this real pretty, we
> could provide a "libpg_ctl" library to start and stop postmaster, as
> well as query the PID. Probably not worth the trouble.
This might not be worth the trouble for this bug, but actually it
could be useful to many third-part tools and extensions to have a
common and generic way to do things. I have seen many utilities using
a copy/paste of pg_ctl functions and still maintain some of them...
Regards,
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Shigeru Hanada 2014-02-18 05:47:51 Re: inherit support for foreign tables
Previous Message Michael Paquier 2014-02-18 03:50:33 Re: Description for pg_replslot in docs