Re: pending patch: Re: HS/SR and smart shutdown - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: pending patch: Re: HS/SR and smart shutdown
Date
Msg-id 1270026167.3684.7671.camel@ebony
Whole thread Raw
In response to Re: pending patch: Re: HS/SR and smart shutdown  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: pending patch: Re: HS/SR and smart shutdown
Re: pending patch: Re: HS/SR and smart shutdown
List pgsql-hackers
On Wed, 2010-03-31 at 17:48 +0900, Fujii Masao wrote:
> On Wed, Mar 31, 2010 at 5:00 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> > Please add some docs that a) explains what the patch does and b) notes
> > any changes from behaviour in previous releases. ISTM this is a major
> > change in behaviour.
> 
> How about adding the following description into "17.5. Shutting Down
> the Server"?
> 
>     If the server is in recovery, it waits for all of the read only
>     connections to be closed.

You need to explain which mode you're talking about. Adding minimal
comments isn't my objective. We need good, useful documentation on every
aspect that you add or change.

> And, where should the note be put in? AFAIK, the previous behavior
> has not been documented anywhere.

> > >From what I have seen, the comment about PM_WAIT_BACKENDS is incorrect.
> > "backends might be waiting for the WAL record that conflicts with their
> > queries to be replayed". Recovery sometimes waits for backends, but
> > backends never wait for recovery.
> 
> Really? As Heikki explained before, backends might wait for the lock
> taken by the startup process.
> http://archives.postgresql.org/pgsql-hackers/2010-01/msg02984.php

Backends wait for locks, yes, but they could be waiting for user locks
also. That is not "waiting for the WAL record", that concept does not
exist.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: pending patch: Re: HS/SR and smart shutdown
Next
From: Mike Lewis
Date:
Subject: Re: Performance Enhancement/Fix for Array Utility Functions