Re: [COMMITTERS] pgsql: Rework subtransaction commit protocol for hot standby.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [COMMITTERS] pgsql: Rework subtransaction commit protocol for hot standby.
Date: 2008-10-22 20:27:39
Message-ID: 1224707259.27145.470.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers


On Wed, 2008-10-22 at 20:52 +0100, Simon Riggs wrote:

> Took a while, but yes, I can reproduce this now. Analysing...

OK, I think I see what it's doing and why it fails the assert.

It's nothing to do with confusing commit/abort.

The new way of doing things on commit is to subcommit then commit. This
sequence is repeated during WAL replay. If we crash, it will try to
repeat the sequence, so in some cases it will try to set status to
subcommitted on a transaction already marked as committed.

So it fails the Assertion, but does the right thing.

A few ways to fix this, but patch to make that case a no-op is attached.

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

Attachment Content-Type Size
clog_bug.v1.patch text/x-patch 850 bytes

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-10-22 20:41:36 Re: [COMMITTERS] pgsql: Rework subtransaction commit protocol for hot standby.
Previous Message Tom Lane 2008-10-22 20:17:52 pgsql: Dept of better ideas: refrain from creating the planner's

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-10-22 20:41:36 Re: [COMMITTERS] pgsql: Rework subtransaction commit protocol for hot standby.
Previous Message Simon Riggs 2008-10-22 19:52:24 Re: [COMMITTERS] pgsql: Rework subtransaction commit protocol for hot standby.