Re: [PATCH] Support Int64 GUCs

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Li Japin <japinli(at)hotmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>
Subject: Re: [PATCH] Support Int64 GUCs
Date: 2024-09-25 11:03:12
Message-ID: CAJ7c6TNx=Bvzo-oZL5vfe6iQca+O0xMfH5uiFRJKRd+yOYxSiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> I found the autovacuum_vacuum_threshold, autovacuum_vacuum_insert_threshold
> and autovacuum_analyze_threshold is change to int64 for relation option,
> however the GUCs are still integers.
>
> ```
> postgres=# select * from pg_settings where name = 'autovacuum_vacuum_threshold' \gx
> -[ RECORD 1 ]---+------------------------------------------------------------
> name | autovacuum_vacuum_threshold
> setting | 50
> unit |
> category | Autovacuum
> short_desc | Minimum number of tuple updates or deletes prior to vacuum.
> extra_desc |
> context | sighup
> vartype | integer
> source | default
> min_val | 0
> max_val | 2147483647
> enumvals |
> boot_val | 50
> reset_val | 50
> sourcefile |
> sourceline |
> pending_restart | f
> ```
>
> Is there something I missed?

No, you found a bug. The patch didn't change ConfigureNamesInt64[]
thus these GUCs were still treated as int32s.

Here is the corrected patch v3. Thanks!

=# select * from pg_settings where name = 'autovacuum_vacuum_threshold';
-[ RECORD 1 ]---+------------------------------------------------------------
name | autovacuum_vacuum_threshold
setting | 1234605616436508552
unit |
category | Autovacuum
short_desc | Minimum number of tuple updates or deletes prior to vacuum.
extra_desc |
context | sighup
vartype | int64
source | configuration file
min_val | 0
max_val | 9223372036854775807
enumvals |
boot_val | 50
reset_val | 1234605616436508552
sourcefile | /Users/eax/pginstall/data-master/postgresql.conf
sourceline | 664
pending_restart | f

--
Best regards,
Aleksander Alekseev

Attachment Content-Type Size
v3-0001-Support-64-bit-integer-GUCs.patch application/octet-stream 44.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Adrien Nayrat 2024-09-25 11:07:13 Re: BUG #18097: Immutable expression not allowed in generated at
Previous Message Ashutosh Bapat 2024-09-25 10:27:08 Re: meson and check-tests