pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Subtransaction commits and Hot Standby
Date: Tue, 16 Sep 2008 15:40:09 +0100
Message-ID: <1221576009.3913.1876.camel@ebony.2ndQuadrant> (raw)
In-Reply-To: <20080916141148.GA9229@alvh.no-ip.org>
References: <1221566023.3913.1823.camel@ebony.2ndQuadrant>
	<48CFBC34.5010802@enterprisedb.com>
	<20080916141148.GA9229@alvh.no-ip.org>


On Tue, 2008-09-16 at 10:11 -0400, Alvaro Herrera wrote:
> Heikki Linnakangas wrote:
> > Simon Riggs wrote:
> >> Subtransactions cause a couple of problems for Hot Standby:
> >
> > Do we need to treat subtransactions any differently from normal  
> > transactions? Just treat all subtransactions as top-level transactions  
> > until commit, and mark them all as committed when you see the commit  
> > record for the top-level transaction.
> 
> This could lead to inconsistent results -- some of the subtransactions
> could be marked as committed while others are still in progress.  Unless
> we want to be able to atomically mark them all as committed, but I don't
> think that's really an option because it could mean holding the clog
> lock for a long time, possibly involving I/O of clog pages.

If we did that we would need to mark them all subcomitted and then mark
them all committed. So its possible, but not desirable.

> I wonder if the improved clog API required to mark multiple
> transactions
> as committed at once would be also useful to TransactionIdCommitTree
> which is used in regular transaction commit.

Yes, I think its an improvement for regular commits/subcommits also.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support




view thread (18+ messages)  latest in thread

Message-ID: <1221576009.3913.1876.camel@ebony.2ndQuadrant>
Permalink:  ../1221576009.3913.1876.camel@ebony.2ndQuadrant/
Also on:    postgresql.org/message-id/1221576009.3913.1876.camel@ebony.2ndQuadrant

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-patches@postgresql.org
  Cc: simon@2ndQuadrant.com, alvherre@commandprompt.com, heikki.linnakangas@enterprisedb.com, pgsql-hackers@postgresql.org
  Subject: Re: Subtransaction commits and Hot Standby
  In-Reply-To: <1221576009.3913.1876.camel@ebony.2ndQuadrant>

* 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