On Sep 25, 2024, at 19:03, Aleksander Alekseev <aleksander@timescale.com> wrote:
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
Thanks for updating the patch.
After testing the v3 patch, I found it cannot correctly handle the number with underscore.
See:
```
postgres=# alter system set autovacuum_vacuum_threshold to 2_147_483_648;
ERROR: invalid value for parameter "autovacuum_vacuum_threshold": "2_147_483_648"
postgres=# alter system set autovacuum_vacuum_threshold to 2_147_483_647;
ALTER SYSTEM
```
IIRC, the lexer only supports integers but not int64.
--
Best regards,
Japin Li