Re: BUG #9756: Inconsistent database after OS restart

From: "Samokhin, Dmitry [MNPP Saturn]" <sdl(at)mnppsaturn(dot)ru>
To: "'Jeff Janes'" <jeff(dot)janes(at)gmail(dot)com>
Cc: "'Pg Bugs'" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #9756: Inconsistent database after OS restart
Date: 2014-03-31 08:15:56
Message-ID: 905A7488008D4507964235F3C36FE154@ghost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jeff,

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=vs.85%2
9.aspx

Regards,
Dmitry.

-----Original Message-----
From: Jeff Janes [mailto:jeff(dot)janes(at)gmail(dot)com]
Sent: Friday, March 28, 2014 9:40 PM
To: sdl(at)mnppsaturn(dot)ru
Cc: Pg Bugs
Subject: Re: [BUGS] BUG #9756: Inconsistent database after OS restart

On Fri, Mar 28, 2014 at 12:58 AM, <sdl(at)mnppsaturn(dot)ru> wrote:

The following bug has been logged on the website:

Bug reference: 9756
Logged by: Dmitry Samokhin
Email address: sdl(at)mnppsaturn(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jan Stavárek 2014-03-31 12:15:30 ::date cast error
Previous Message digoal@126.com 2014-03-31 07:25:50 Re: BUG #9757: Why reclaim index deleted pages need twice vacuum