Re: Add 64-bit XIDs into PostgreSQL 15

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Maxim Orlov <orlovmg(at)gmail(dot)com>, Shubham Khanna <khannashubham1197(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Chris Travers <chris(at)orioledata(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Chris Travers <chris(dot)travers(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Fedor Sigaev <teodor(at)sigaev(dot)ru>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Konstantin Knizhnik <knizhnik(at)garret(dot)ru>, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>
Subject: Re: Add 64-bit XIDs into PostgreSQL 15
Date: 2024-07-25 11:09:10
Message-ID: 1820e21c-47e7-4633-a80d-f986f345a117@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25/07/2024 13:19, Peter Eisentraut wrote:
> I'm wondering about the 64-bit GUCs.
>
> At first, it makes sense that if there are settings that are counted in
> terms of transactions, and transaction numbers are 64-bit integers, then
> those settings should accept 64-bit integers.
>
> But what is the purpose and effect of setting those parameters to such
> huge numbers?  For example, what is the usability of being able to set
>
> vacuum_failsafe_age = 500000000000
>
> I think in the world of 32-bit transaction IDs, you can intuitively
> interpret most of these "transaction age" settings as "percent toward
> disaster".  For example,
>
> vacuum_freeze_table_age = 150000000
>
> is 7% toward disaster, and
>
> vacuum_failsafe_age = 1600000000
>
> is 75% toward disaster.
>
> However, if there is no more disaster threshold at 2^31, what is the
> guidance for setting these?  Or more radically, why even run
> transaction-count-based vacuum at all?

To allow the CLOG to be truncated. There's no disaster anymore, but
without freezing, the clog will grow indefinitely.

> Conversely, if there is still some threshold (not disaster, but
> efficiency or something else), would it still be useful to keep these
> settings well below 2^31?  In which case, we might not need 64-bit GUCs.

Yeah, I don't think it's critical. It makes sense to switch to 64 bit
GUCs, so that you can make those settings higher, but it's not critical
or strictly required for the rest of the work.

Another approach is to make the GUCs to mean "thousands of XIDs",
similar to how many of our memory settings are in kB rather than bytes.
that might be a super confusing change for existing settings though.

--
Heikki Linnakangas
Neon (https://neon.tech)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message px shi 2024-07-25 11:48:01 CREATE MATERIALIZED VIEW
Previous Message Amit Kapila 2024-07-25 10:42:15 Re: Conflict detection and logging in logical replication