Skip site navigation (1) Skip section navigation (2)

Re: pending patch: Re: HS/SR and smart shutdown

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pending patch: Re: HS/SR and smart shutdown
Date: 2010-03-31 08:00:38
Message-ID: 1270022438.3684.7552.camel@ebony (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, 2010-03-31 at 10:48 +0900, Fujii Masao wrote:
> On Wed, Mar 31, 2010 at 9:47 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > On Tue, Mar 30, 2010 at 5:09 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> >> I rebased the patch to HEAD. Is the patch still required for 9.0?
> >> If not, I'd remove the open item of the smart shutdown during
> >> recovery.
> >
> > I am by no means an expert on this area of the code, but in the
> > interest of moving things along I reviewed this patch tonight.
> Thanks a lot!
> > 1. I wonder if there is a problem if we receive SIGINT while in the
> > PM_WAIT_READONLY state?  Seems to me that might need to be added to
> > the if statement beginning at line 2212, in pmdie().
> >
> > 2. It appears to me that HandleChildCrash() needs to switch to
> > PM_WAIT_BACKENDS state if it's in PM_WAIT_READONLY when the child
> > crash occurs - i.e. the if statement beginning at line 2772 needs
> > updating.
> >
> > Thoughts?
> Oh, those are my oversights. You are right!
> I modified the patch as you pointed out.

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.

The reason for the lack of consensus on this issue is simply people
aren't following what you're talking about and don't want to have to
re-read a whole thread to do so. It might be that many would agree.

>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.

 Simon Riggs 

In response to


pgsql-hackers by date

Next:From: Boszormenyi ZoltanDate: 2010-03-31 08:35:31
Subject: Re: Problems with variable cursorname in ecpg
Previous:From: Dave PageDate: 2010-03-31 07:57:48
Subject: Re: Alpha release this week?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group