pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Luca Ferrari <fluca1978@gmail.com>
To: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: questions about wraparound
Date: Tue, 06 Apr 2021 10:46:08 +0200
Message-ID: <bcd5a091ce5abc8efa6790e3efb8ac8a0b52055c.camel@cybertec.at> (raw)
In-Reply-To: <CAKoxK+7bepHhfPexDRTnva6NKZ6dpTJiimMFhuPahU3emT5s9A@mail.gmail.com>
References: <CAKoxK+5yPtx3-VOea_GJPp5fNHXc+EnGPUkBSh3ccx3B+0Sd=w@mail.gmail.com>
	<20210402102900.7ae6e665@firost>
	<CAKoxK+7bepHhfPexDRTnva6NKZ6dpTJiimMFhuPahU3emT5s9A@mail.gmail.com>

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






view thread (14+ messages)  latest in thread

Message-ID: <bcd5a091ce5abc8efa6790e3efb8ac8a0b52055c.camel@cybertec.at>
Permalink:  ../bcd5a091ce5abc8efa6790e3efb8ac8a0b52055c.camel@cybertec.at/
Also on:    postgresql.org/message-id/bcd5a091ce5abc8efa6790e3efb8ac8a0b52055c.camel@cybertec.at

 · 

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-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, fluca1978@gmail.com, jgdr@dalibo.com
  Subject: Re: questions about wraparound
  In-Reply-To: <bcd5a091ce5abc8efa6790e3efb8ac8a0b52055c.camel@cybertec.at>
  References: <CAKoxK+5yPtx3-VOea_GJPp5fNHXc+EnGPUkBSh3ccx3B+0Sd=w@mail.gmail.com> <20210402102900.7ae6e665@firost> <CAKoxK+7bepHhfPexDRTnva6NKZ6dpTJiimMFhuPahU3emT5s9A@mail.gmail.com> <bcd5a091ce5abc8efa6790e3efb8ac8a0b52055c.camel@cybertec.at>

* 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