Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WV0Ck-0006uF-FZ for pgsql-bugs@arkaria.postgresql.org; Tue, 01 Apr 2014 15:02:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WV0Cj-0001bg-LQ for pgsql-bugs@arkaria.postgresql.org; Tue, 01 Apr 2014 15:02:21 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUyC7-0000S6-FO for pgsql-bugs@postgresql.org; Tue, 01 Apr 2014 12:53:35 +0000 Received: from mail.mnppsaturn.ru ([194.190.194.74]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUyC3-0008AT-MU for pgsql-bugs@postgresql.org; Tue, 01 Apr 2014 12:53:34 +0000 Received: from ghost (ghost.mnppsaturn.ru [192.168.1.13]) by mail.mnppsaturn.ru (Postfix) with ESMTP id 4F39230C1743; Tue, 1 Apr 2014 16:53:28 +0400 (MSK) Reply-To: From: "Samokhin, Dmitry [MNPP Saturn]" To: "'Jeff Janes'" Cc: "'Pg Bugs'" Subject: Re: BUG #9756: Inconsistent database after OS restart Date: Tue, 1 Apr 2014 16:53:35 +0400 Organization: Saturn Message-ID: <4C92AA5367E24A30B621169C26E8A222@ghost> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Pg-Spam-Score: -0.6 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org > -----Original Message----- > From: Jeff Janes [mailto:jeff.janes@gmail.com]=20 > Sent: Monday, March 31, 2014 7:56 PM > To: sdl@mnppsaturn.ru > Cc: Pg Bugs > Subject: Re: [BUGS] BUG #9756: Inconsistent database after OS restart > > Sorry, I don't understand most of that, and don't see anything there about what happens when Windows itself is shutting down. > But from the log, it is clear that PostgreSQL did get the notification it was supposed to exit (however it received that > notification), but that it was not allowed to complete the process. Maybe Windows was told to reboot with a "force" flag > that causes it to not wait, or maybe Windows decided that PostgreSQL was not communicating with the SCM properly and > therefore deserved no mercy.=20=20 Some more useful info: http://msdn.microsoft.com/en-us/library/windows/desktop/ms685149%28v=3Dvs.8= 5%2 9.aspx This article says that there is a registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WaitToKillServiceTimeout which controls the time limit for services cleanup when the operating system is rebooting (see also http://technet.microsoft.com/en-us/library/cc976045.aspx). Its default value is 20000 (20 s), while Postgres usually needs 1-3 seconds to completely stop. Maybe there are certain cases when the autovacuum subprocess is somehow shut down by the Postgres control module after the whole cluster is done and this behaviour affects the DB integrity. Dmitry. --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs