Re: Why does xlog.c not treat COMMIT_PREPARED/ABORT_PREPARED as commit/abort?

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Why does xlog.c not treat COMMIT_PREPARED/ABORT_PREPARED as commit/abort?
Date: 2014-07-24 22:04:27
Message-ID: 20140724220427.GH16857@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-07-24 17:53:17 -0400, Tom Lane wrote:
> There's a bunch of code in xlog.c that special-cases commit/abort records
> for purposes of controlling replay, ie whether you can pause before/after
> a particular xlog record, extract a timestamp from it, etc. This code
> does not, and apparently never has, counted COMMIT_PREPARED or
> ABORT_PREPARED as commit/abort records. Is there a good reason for that,
> or is it just an oversight?

Seems like an oversight to me.

> I noticed this in investigation of bug #11032, which is a side effect
> of the fact that xlog.c doesn't believe there's any timestamp to be
> found in COMMIT_PREPARED records. But more generally, they can't be
> used as recovery targets, and I don't see a reason for that.

> Assuming we agree that this is a bug, is it something to back-patch,
> or do we not want to change back-branch behavior here?

I started to argue that we should change the cases where
SetLatestXTime() but not stop for prepared xacts but couldn't really
think of a reason why it'd be a good plan. So I ovte for backpatching
the whole thing.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-07-24 22:42:36 Re: Minor inaccuracy in jsonb_path_ops documentation
Previous Message Tom Lane 2014-07-24 22:02:13 Re: Minor inaccuracy in jsonb_path_ops documentation