Re: questions about wraparound

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Luca Ferrari <fluca1978(at)gmail(dot)com>, Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: questions about wraparound
Date: 2021-04-06 08:46:08
Message-ID: bcd5a091ce5abc8efa6790e3efb8ac8a0b52055c.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 2021-04-03 at 15:22 +0200, Luca Ferrari wrote:
> why having a TransactionId that is 32 bits
> in depth while it is exposed (thru txid_current()) as a 64 bits value?
> I mean, having 64 bits would reduce the need for anti-wrap arpund
> vacuum. I suspect the usage of 32 bits is both for compatibility and
> tuple header size, but I'm just guessing.

Because there are two of these transaction IDs stored on each tuple
(xmin and xmax) to determine its visibility. The overhead of 8 bytes
per tuples for visibility is already pretty high.

Another downside is that changing this would prevent the use of
pg_upgrade for upgrading, as the on-disk format changes.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message chlor 2021-04-06 12:17:00 LDAP, single sign on from Windows client
Previous Message Mihalidesová Jana 2021-04-06 06:15:20 Upgrade from 11.3 to 13.1 failed with out of memory