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-04-01 12:53:35
Message-ID: 4C92AA5367E24A30B621169C26E8A222@ghost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> -----Original Message-----
> From: Jeff Janes [mailto:jeff(dot)janes(at)gmail(dot)com]
> Sent: Monday, March 31, 2014 7:56 PM
> To: sdl(at)mnppsaturn(dot)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.

Some more useful info:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms685149%28v=vs.85%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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message jan.sarenik 2014-04-01 14:19:07 BUG #9818: LDAP Authentication subtree problem
Previous Message Samokhin, Dmitry [MNPP Saturn] 2014-04-01 12:16:11 Re: BUG #9756: Inconsistent database after OS restart