Re: Comparing txid and xmin (under BDR) - Mailing list pgsql-general

From Peter Mogensen
Subject Re: Comparing txid and xmin (under BDR)
Date
Msg-id 5551AE60.3000106@one.com
Whole thread Raw
In response to Re: Comparing txid and xmin (under BDR)  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-general

On 2015-05-12 06:06, Craig Ringer wrote:
> On 11 May 2015 at 21:10, Peter Mogensen <apm@one.com> wrote:
>
>>
>> So ... I can easily get the current txid of the SELECT transaction by
>> calling txid_current().
>>
> Note that by doing so, you force txid allocation for a read-only query that
> might otherwise not need one, which increases your txid burn rate and
> decreases time until you need to do wraparound-protection vacuuming.
>


The same is not true for txid_snapshot_xmin() is it?

I mean ... I really don't need the actual txid of a SELECT statement.
Only to ensure that it's never than any invalidation event.
So it's enough to just use txid_snapshot_xmin() ... at the cost of
possibly not caching new values in a small window after invalidation.

/Peter



pgsql-general by date:

Previous
From: "Wayne E. Seguin"
Date:
Subject: Re: [BDR] Node Join Question
Next
From: Craig Ringer
Date:
Subject: Re: [BDR] Node Join Question