pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #18384: It's not bug just question about documentation
2+ messages / 2 participants
[nested] [flat]

* BUG #18384: It's not bug just question about documentation
@ 2024-03-08 06:00  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2024-03-08 06:00 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: junhkang91@gmail.com

The following bug has been logged on the website:

Bug reference:      18384
Logged by:          Jun Kang
Email address:      junhkang91@gmail.com
PostgreSQL version: 16.2
Operating system:   Linux
Description:        

I am a big PostgreSQL lover and keep reading documents and implying to
postgresql with bigdata service.

while I am reading
https://www.postgresql.org/docs/16/transaction-id.html
and 
https://www.postgresql.org/docs/16/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND,
i have a question.
"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)?
as the freezing issue, isnt it better to reduce vacuum count?



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #18384: It's not bug just question about documentation
@ 2024-03-08 15:28  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2024-03-08 15:28 UTC (permalink / raw)
  To: junhkang91@gmail.com; +Cc: pgsql-bugs@lists.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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-03-08 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08 06:00 BUG #18384: It's not bug just question about documentation PG Bug reporting form <noreply@postgresql.org>
2024-03-08 15:28 ` Tom Lane <tgl@sss.pgh.pa.us>

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