Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUc9U-0003qf-JD for pgsql-bugs@arkaria.postgresql.org; Mon, 31 Mar 2014 13:21:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WUc9T-0006MQ-4Z for pgsql-bugs@arkaria.postgresql.org; Mon, 31 Mar 2014 13:21:23 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUXNy-0005DA-6g for pgsql-bugs@postgresql.org; Mon, 31 Mar 2014 08:16:02 +0000 Received: from mail.mnppsaturn.ru ([194.190.194.74]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUXNp-00020q-0o for pgsql-bugs@postgresql.org; Mon, 31 Mar 2014 08:16:01 +0000 Received: from ghost (ghost.mnppsaturn.ru [192.168.1.13]) by mail.mnppsaturn.ru (Postfix) with ESMTP id A650030C16EA; Mon, 31 Mar 2014 12:15:49 +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: Mon, 31 Mar 2014 12:15:56 +0400 Organization: Saturn Message-ID: <905A7488008D4507964235F3C36FE154@ghost> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0010_01CF4CDA.F85AB770" 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.2 (/) 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 This is a multi-part message in MIME format. ------=_NextPart_000_0010_01CF4CDA.F85AB770 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Jeff, =20 Due to a huge variety of services and their functionality, it's almost impossible to know (or predict) how much time every service needs to complete its init and deinit operations. Giving any "reasonable", = "average", "sufficient" time to all of them to do this work would result in unreliability, on one hand, and waste of hardware and human resources, = on the other hand. Instead, the service workflow in Windows is designed so services receive control events from the Service Control Manager and = then they report when they are actually up or down, so Windows is able to continue the required either startup or shutdown process. For details, = see http://msdn.microsoft.com/en-us/library/windows/desktop/ee126211%28v=3Dvs= .85%2 9.aspx =20 Regards, Dmitry. =20 -----Original Message----- From: Jeff Janes [mailto:jeff.janes@gmail.com]=20 Sent: Friday, March 28, 2014 9:40 PM To: sdl@mnppsaturn.ru Cc: Pg Bugs Subject: Re: [BUGS] BUG #9756: Inconsistent database after OS restart On Fri, Mar 28, 2014 at 12:58 AM, wrote: The following bug has been logged on the website: Bug reference: 9756 Logged by: Dmitry Samokhin Email address: sdl@mnppsaturn.ru PostgreSQL version: 9.2.8 Operating system: Windows XP, 7 Description: After every Windows restart, database couldn't be shut down properly and recovering actions are performed on the next startup. But if we control = the service manually by the Windows Services snap-in, no problem with the correct DB cluster shutdown. Looks like there's something wrong with the correct autovacuum process shutdown which leads to the DB inconsistency. *** Windows restart: *** -- Stopping: 2014-03-28 11:37:34 MSK LOG: received fast shutdown request 2014-03-28 11:37:34 MSK LOG: aborting any active transactions 2014-03-28 11:37:34 MSK LOG: autovacuum launcher shutting down 2014-03-28 11:37:34 MSK ERROR: canceling statement due to user request It looks like Windows told the server to shutdown, but did not give it enough time to complete the process before killing it uncleanly. Can you make Windows shutdown more patient? Cheers, Jeff ------=_NextPart_000_0010_01CF4CDA.F85AB770 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Message
Jeff,
 
Due to=20 a huge variety of services and their functionality, it's almost = impossible=20 to know (or predict) how much time every service needs to complete = its init=20 and deinit operations. Giving any "reasonable", "average",=20 "sufficient" time to all of them to do this work would result in=20 unreliability, on one hand, and waste of hardware and human = resources,=20 on the other hand. Instead, the service workflow in Windows is = designed so services receive control events from the Service = Control=20 Manager and then they report when they are actually up or = down, so=20 Windows is able to continue the required either startup or = shutdown=20 process. For details, see http://msdn.microsoft.com/en-us/library/windows/desk= top/ee126211%28v=3Dvs.85%29.aspx
 
Regards,
Dmitry.
 
-----Original Message-----
From: Jeff Janes=20 [mailto:jeff.janes@gmail.com]
Sent: Friday, March 28, 2014 = 9:40=20 PM
To: sdl@mnppsaturn.ru
Cc: Pg = Bugs
Subject:=20 Re: [BUGS] BUG #9756: Inconsistent database after OS=20 restart

On Fri, Mar 28, 2014 at 12:58 AM, <sdl@mnppsaturn.ru>=20 wrote:
The following bug has been logged on the=20 website:

Bug reference:      9756
Logged = by:  =20        Dmitry Samokhin
Email address:   =  =20  sdl@mnppsaturn.ru
PostgreSQL=20 version: 9.2.8
Operating system:   Windows XP,=20 7
Description:

After every Windows restart, database = couldn't be=20 shut down properly and
recovering actions are performed on the = next=20 startup. But if we control the
service manually by the Windows = Services=20 snap-in, no problem with the
correct DB cluster shutdown. Looks = like=20 there's something wrong with the
correct autovacuum process = shutdown=20 which leads to the DB inconsistency.


*** Windows restart: ***

--=20 Stopping:
2014-03-28 11:37:34 MSK LOG:  received fast = shutdown=20 request
2014-03-28 11:37:34 MSK LOG:  aborting any active=20 transactions
2014-03-28 11:37:34 MSK LOG:  autovacuum = launcher=20 shutting down
2014-03-28 11:37:34 MSK ERROR:  canceling = statement=20 due to user request

It looks like Windows told the server to shutdown, but did not = give it=20 enough time to complete the process before killing it uncleanly.

Can you make Windows shutdown more patient?

Cheers,

Jeff
------=_NextPart_000_0010_01CF4CDA.F85AB770--