X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 89405475925 for ; Mon, 17 Feb 2003 18:58:39 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id E01DF4758FE for ; Mon, 17 Feb 2003 18:58:38 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h1HNwc5u016314; Mon, 17 Feb 2003 18:58:38 -0500 (EST) To: Laurette Cisneros Cc: pgsql-admin@postgresql.org Subject: Re: server won't shutdown In-reply-to: References: Comments: In-reply-to Laurette Cisneros message dated "Mon, 17 Feb 2003 14:56:24 -0800" Date: Mon, 17 Feb 2003 18:58:37 -0500 Message-ID: <16313.1045526317@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/272 X-Sequence-Number: 7470 Laurette Cisneros writes: > Ok, my production server had this problem (again). So, here's the info. > you requested. There's a lot of postgres processes still left running: > postmaster (proc id 1457): > (gdb) print Shutdown > $1 = 2 Okay, so the postmaster definitely got the FastShutdown request ... > postgres 1468 1457 0 Feb06 ? 00:04:57 postgres: nbadmin db1 111.123.123.244 idle > InterruptPending: $1 = 65537 > proc_exit_inprogress: $2 = 0 > ProcDiePending: $3 = 1 > ImmediateInterruptOK = $4 = 0 > InterruptHoldoffCount = $5 = 0 > CritSectionCount = $6 = 0 ... and it correctly sent it on to the backends, because they all have ProcDiePending true, which proves that the die() signal handler did run. So why are they sitting waiting for input? They should have exited, either instantly in die() if it occurred while they were already waiting for input, or at the CHECK_FOR_INTERRUPTS() just before they next called ReadCommand(). I can't see any window for failure there. I'm baffled. The only thing I can see to investigate is that InterruptPending printed out as 65537 in each backend. It's declared as bool, and only ever set to true or false, so I'd have expected a result of 0 or 1 --- in fact, since bool is char, it's impossible for it to contain a value of 65537. Is gdb confused, or is there something fishy there? BTW, do you have any idea whether any backends *did* exit? Is this all of the ones that were running, or did some obey the shutdown signal? (You could look for "This connection has been terminated by the administrator." errors in the postmaster log to see if any did obey.) regards, tom lane