pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: junhkang91@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18384: It's not bug just question about documentation
Date: Fri, 08 Mar 2024 10:28:26 -0500
Message-ID: <794154.1709911706@sss.pgh.pa.us> (raw)
In-Reply-To: <18384-d9f97269de73f0fa@postgresql.org>
References: <18384-d9f97269de73f0fa@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> "The internal transaction ID type xid is 32 bits wide and wraps around every
> 4 billion transactions."
> "it is necessary to vacuum every table in every database at least once every
> two billion transactions."

> why Postgresql needs to vacuum in every 2B transactions even though txid
> wraps on every 4 billion transactions (double time)?

Because an XID that's more than 2B transactions in the past will wrap
around and be seen as a bit less than 2B transactions in the future,
causing any rows bearing that XID to become invisible to current
transactions.

			regards, tom lane





view thread (2+ messages)

Message-ID: <794154.1709911706@sss.pgh.pa.us>
Permalink:  ../794154.1709911706@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/794154.1709911706@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, junhkang91@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18384: It's not bug just question about documentation
  In-Reply-To: <794154.1709911706@sss.pgh.pa.us>

* 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