Re: 64-bit XIDs again

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 64-bit XIDs again
Date: 2015-07-30 14:59:48
Message-ID: 55BA3BE4.8000408@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07/30/2015 05:57 PM, Alexander Korotkov wrote:
> On Thu, Jul 30, 2015 at 5:24 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>>
>> I think we should move to 64-bit XIDs in in-memory structs snapshots, proc
>> array etc. And expand clog to handle 64-bit XIDs. But keep the xmin/xmax
>> fields on heap pages at 32-bits, and add an epoch-like field to the page
>> header so that logically the xmin/xmax fields on the page are 64 bits wide,
>> but physically stored in 32 bits. That's possible as long as no two XIDs on
>> the same page are more than 2^31 XIDs apart. So you still need to freeze
>> old tuples on the page when that's about to happen, but it would make it
>> possible to have more than 2^32 XID transactions in the clog. You'd never
>> be forced to do anti-wraparound vacuums, you could just let the clog grow
>> arbitrarily large.
>
> Nice idea. Storing extra epoch would be extra 4 bytes per heap tuple
> instead of extra 8 bytes per tuple if storing 64 bits xmin/xmax.

No, I was thinking that the epoch would be stored *per page*, in the
page header.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2015-07-30 15:04:27 Re: 64-bit XIDs again
Previous Message Alexander Korotkov 2015-07-30 14:57:13 Re: 64-bit XIDs again