pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix commit_ts for FrozenXid and BootstrapXid
Date: Thu, 24 Nov 2016 18:42:30 +0000
Message-ID: <E1c9yyc-0000fu-DB@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Fix commit_ts for FrozenXid and BootstrapXid

Previously, requesting commit timestamp for transactions
FrozenTransactionId and BootstrapTransactionId resulted in an error.
But since those values can validly appear in committed tuples' Xmin,
this behavior is unhelpful and error prone: each caller would have to
special-case those values before requesting timestamp data for an Xid.
We already have a perfectly good interface for returning "the Xid you
requested is too old for us to have commit TS data for it", so let's use
that instead.

Backpatch to 9.5, where commit timestamps appeared.

Author: Craig Ringer
Discussion: https://www.postgresql.org/message-id/CAMsr+YFM5Q=+ry3mKvWEqRTxrB0iU3qUSRnS28nz6FJYtBwhJg@mail.gmail...

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/4aaddf2f009821e29aea3735e44332ad9ca47aaa

Modified Files
--------------
src/backend/access/transam/commit_ts.c                     | 11 +++++++++--
src/test/modules/commit_ts/expected/commit_timestamp.out   | 12 ++++++++++--
src/test/modules/commit_ts/expected/commit_timestamp_1.out | 12 ++++++++++--
src/test/modules/commit_ts/t/004_restart.pl                | 14 ++++----------
4 files changed, 33 insertions(+), 16 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (3+ messages)

Message-ID: <E1c9yyc-0000fu-DB@gemulon.postgresql.org>
Permalink:  ../E1c9yyc-0000fu-DB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1c9yyc-0000fu-DB@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Fix commit_ts for FrozenXid and BootstrapXid
  In-Reply-To: <E1c9yyc-0000fu-DB@gemulon.postgresql.org>
  References: <E1c9yyc-0000fu-DB@gemulon.postgresql.org>

* 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