Re: [bugfix] commit timestamps ERROR on lookup of FrozenTransactionId

From: Andres Freund <andres(at)anarazel(dot)de>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bugfix] commit timestamps ERROR on lookup of FrozenTransactionId
Date: 2016-11-23 18:32:38
Message-ID: 20161123183238.5blk75io74juoag4@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2016-11-23 20:58:22 +0800, Craig Ringer wrote:
> Today I ran into an issue where commit timestamp lookups were failing with
>
> ERROR: cannot retrieve commit timestamp for transaction 2
>
> which is of course FrozenTransactionId.
>
> TransactionIdGetCommitTsData(...) ERRORs on !TransactionIdIsNormal(),
> which I think is wrong. Attached is a patch to make it return 0 for
> FrozenTransactionId and BootstrapTransactionId, like it does for xids
> that are too old.

Why? It seems quite correct to not allow lookups for special case
values, as it seems sensible to give them special treatmeant at the call
site?

> IMO this should be back-patched to 9.6 and, without the TAP test part,
> to 9.5.

Why would we want to backpatch a behaviour change, where arguments for
the current and proposed behaviour exists?

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Maeldron T. 2016-11-23 19:43:18 Google Cloud Compute + FreeBSD + PostgreSQL = timecounter issue
Previous Message Jeff Janes 2016-11-23 18:16:11 Re: postgres 9.3 postgres_fdw ::LOG: could not receive data from client: Connection reset by peer