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

2014-02-19 Thread Robert Haas
On Mon, Feb 17, 2014 at 11:29 AM, Alvaro Herrera 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

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

2014-02-17 Thread Michael Paquier
On Tue, Feb 18, 2014 at 1:29 AM, Alvaro Herrera 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 > woul

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

2014-02-17 Thread Alvaro Herrera
MauMau escribió: > pg_ctl timed out waiting for the zombie postgres. > > maumau 19621 18849 0 15:21 pts/900:00:00 [postgres] > maumau 20253 18849 0 15:22 pts/900:00:00 > /maumau/postgresql-9.4/src/test/regress/./tmp_check/install//maumau/pgsql/bin/pg_ctl > stop -D /maumau/postgresql-9

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

2014-01-30 Thread MauMau
From: "Ronan Dunklau" There is no regression tests covering this bugfix, althought I don't know if it would be practical to implement them. Thanks for reviewing the patch. I'm glad to know that it seems OK. Unfortunately, the current regression test system cannot handle the testing of pg_c

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

2014-01-27 Thread Ronan Dunklau
Le mardi 7 janvier 2014 17:05:03 Michael Paquier a écrit : > On Sun, Jan 5, 2014 at 3:49 PM, MauMau wrote: > > Could you confirm again and tell me what problem is happening? > > FWIW, I just quickly tested those two patches independently and got > them correctly applied with patch -p1 < $PATCH on

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

2014-01-07 Thread Michael Paquier
On Sun, Jan 5, 2014 at 3:49 PM, MauMau wrote: > Could you confirm again and tell me what problem is happening? FWIW, I just quickly tested those two patches independently and got them correctly applied with patch -p1 < $PATCH on master at edc4345. They compiled and passed as well make check. Regar

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

2014-01-04 Thread MauMau
From: "Peter Eisentraut" On 12/25/13, 6:40 AM, MauMau wrote: pg_regress must wait for postgres to terminate by calling waitpid(), because it invoked postgres directly. The attached pg_regress_pg_stop.patch does this. If you like the combination of this and the original fix for pg_ctl in one p

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

2014-01-03 Thread Peter Eisentraut
On 12/25/13, 6:40 AM, MauMau wrote: > pg_regress must wait for postgres to terminate by calling waitpid(), > because it invoked postgres directly. The attached > pg_regress_pg_stop.patch does this. If you like the combination of this > and the original fix for pg_ctl in one patch, please use > pg

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

2013-12-25 Thread MauMau
From: "Peter Eisentraut" This patch breaks the regression tests: xml ... ok test stats... ok == shutting down postmaster == pg_ctl: server does not shut down pg_regress: could not stop postmaster: exit code was

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

2013-12-24 Thread Peter Eisentraut
On 12/5/13, 7:07 AM, MauMau wrote: > From: "Tom Lane" >> If you're going to do a postmaster_is_alive check, why bother with >> repeated get_pgpid()? > > As I said yesterday, I removed get_pgpid() calls. I'll add this patch > to 2014-1 commitfest this weekend if it is not committed until then. T

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

2013-12-05 Thread MauMau
From: "Tom Lane" If you're going to do a postmaster_is_alive check, why bother with repeated get_pgpid()? As I said yesterday, I removed get_pgpid() calls. I'll add this patch to 2014-1 commitfest this weekend if it is not committed until then. Regards MauMau pg_stop_fail_v2.patch Descri

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

2013-12-04 Thread MauMau
From: "Tom Lane" 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

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

2013-12-03 Thread Tom Lane
"MauMau" writes: > The problem occurs in the sequence below: > 1. postmaster creates $PGDATA/postmaster.pid. > 2. postmaster tries to resolve the value of listen_addresses to IP > addresses. This took about 15 seconds in my failure scenario. > 3. During 2, pg_ctl sends SIGTERM to postmaster. >

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

2013-12-03 Thread MauMau
Hello, I've encountered a small bug and fixed it. I guess this occurs on all major releases. I saw this happen on 9.2 and 9.4devel. Please find attached the patch and commit this. [Problem] If I mistakenly set an invalid value to listen_addresses, say '-1', and start the database server,