Re: [bug fix] "pg_ctl stop" times out when it should respond quickly - Mailing list pgsql-hackers

From MauMau
Subject Re: [bug fix] "pg_ctl stop" times out when it should respond quickly
Date
Msg-id 40D7CDE1B0464EE4B97FAE76AFCC9023@maumau
Whole thread Raw
In response to Re: [bug fix] "pg_ctl stop" times out when it should respond quickly  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
From: "Tom Lane" <tgl@sss.pgh.pa.us>
> I think the reason why it was coded like that was that we hadn't written
> postmaster_is_alive() yet, or maybe we had but didn't want to trust it.
> However, with the coding you have here, we're fully exposed to any failure
> modes postmaster_is_alive() may have; so there's not a lot of value in
> accepting those and get_pgpid's failure modes too.

Thank you for reviewing the patch so quickly.  You are right, I don't think 
get_pgpid() here is no longer necessary.  If the pid changes in one second, 
i.e. the original postgres terminates and "pg_ctl start" starts another one, 
"pg_ctl stop" can terminate successfully because the original postgres it 
was waiting for actually terminated.

I'll submit the revised patch tomorrow.

Regards
MauMau




pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Problem with displaying "wide" tables in psql
Next
From: "MauMau"
Date:
Subject: Re: [bug fix or improvement?] Correctly place DLLs for ECPG apps in bin folder