Re: Problem with txid_snapshot_in/out() functionality

From: Greg Stark <stark(at)mit(dot)edu>
To: Jan Wieck <jan(at)wi3ck(dot)info>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problem with txid_snapshot_in/out() functionality
Date: 2014-04-12 14:09:35
Message-ID: CAM-w4HMUbC_vPPx11NBHGRNRSWFnsJGpqbYsfnnuum686Lx0SA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12 Apr 2014 08:35, "Jan Wieck" <jan(at)wi3ck(dot)info> wrote:
>
> On 04/12/14 03:27, Heikki Linnakangas wrote:
>>
>> On 04/12/2014 12:07 AM, Jan Wieck wrote:
>>>
>>> Hackers,

>> Hmm. Do we snapshots to be stored in tables, and included in a dump? I
>> don't think we can guarantee that will work, at least not across
>> versions, as the way we handle snapshot internally can change.
>
>
> At least Londiste and Slony do store snapshots as well as xids in tables
and assuming that the txid epoch is properly bumped, that information is
useful and valid after a restore.

As I understand it the epoch increments whenever the xid wraps.

A physical restore would continue the same xid space in the same epoch
which should work fine as long as no system stores any txids outside the
database from the "future".

A pg_restore would start a new xid space from FirstNormalXid which would
obviously not work with any stored txids.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2014-04-12 15:15:09 Re: Problem with txid_snapshot_in/out() functionality
Previous Message Andres Freund 2014-04-12 14:03:42 Re: Problem with txid_snapshot_in/out() functionality