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

Re: Hot Standby 0.2.1

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hot Standby 0.2.1
Date: 2009-09-25 10:32:13
Message-ID: 1253874733.4449.609.camel@ebony.2ndQuadrant (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Fri, 2009-09-25 at 13:23 +0300, Heikki Linnakangas wrote:
> Simon Riggs wrote:
> > On Wed, 2009-09-23 at 17:45 +0300, Heikki Linnakangas wrote:
> >> XactClearRecoveryTransactions() when we see a shutdown checkpoint, which
> >> clears all recovery locks. But doesn't that prematurely clear all locks
> >> belonging to prepared transactions as well?
> > 
> > Much better to read your second post(s). :-)
> > 
> > Yes, you have found a(nother) issue. This was the first one that gave me
> > pause to think of the answer. The locks currently aren't tracked as to
> > whether they are 2PC or not, so we would need to store that info also so
> > that we can selectively release locks later.
> > 
> > Question: is it possible to do a fast shutdown when we have a prepared
> > transaction?
> Yes.
> > Would it be better to take a different approach there for
> > prepared transactions? It seems strange to write a shutdown checkpoint
> > when the system isn't yet "clean".
> Hmm, I guess you could define prepared transactions as active backends
> from the shutdown point of view, and wait for them to finish. I can see
> one problem, though: Once you issue shutdown, fast or smart, we no
> longer accept new connections. So you can't connect to issue the
> ROLLBACK/COMMIT PREPARED anymore. Anyway, it would be a change from the
> current behavior, so it would be better to cope with prepared
> transactions in the standby.

Definitely need to cope with them for Hot Standby. My point was general
one to say that behaviour is very non-useful for users with prepared
transactions. It just causes manual effort by a DBA each time the system
is shutdown.

 Simon Riggs 

In response to


pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2009-09-25 11:00:52
Subject: Re: Hot Standby 0.2.1
Previous:From: Dave PageDate: 2009-09-25 10:31:17
Subject: Docs build error in alpha1

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