pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Samokhin, Dmitry [MNPP Saturn] <sdl@mnppsaturn.ru>
To: 'Jeff Janes' <jeff.janes@gmail.com>
Cc: 'Pg Bugs' <pgsql-bugs@postgresql.org>
Subject: Re: BUG #9756: Inconsistent database after OS restart
Date: Tue, 1 Apr 2014 16:53:35 +0400
Message-ID: <4C92AA5367E24A30B621169C26E8A222@ghost> (raw)
In-Reply-To: <CAMkU=1wpitsVq3_F-L1FgZZ3o+hHzYR7wkKwBnuupPRC+GZH1Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

> -----Original Message-----
> From: Jeff Janes [mailto:jeff.janes@gmail.com] 
> 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.  

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.



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (6+ messages)

Message-ID: <4C92AA5367E24A30B621169C26E8A222@ghost>
Permalink:  ../4C92AA5367E24A30B621169C26E8A222@ghost/
Also on:    postgresql.org/message-id/4C92AA5367E24A30B621169C26E8A222@ghost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: sdl@mnppsaturn.ru, jeff.janes@gmail.com
  Subject: Re: BUG #9756: Inconsistent database after OS restart
  In-Reply-To: <4C92AA5367E24A30B621169C26E8A222@ghost>
  References: <CAMkU=1wpitsVq3_F-L1FgZZ3o+hHzYR7wkKwBnuupPRC+GZH1Q@mail.gmail.com> <4C92AA5367E24A30B621169C26E8A222@ghost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox