From: | Чумак Антон <a(dot)chumak(at)postgrespro(dot)ru> |
---|---|
To: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: [PATCH] Introduce unified support for composite GUC options |
Date: | 2025-09-23 04:33:16 |
Message-ID: | 11ad52-68d22300-1-43225800@32229917 |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>when you use json, then what is the benefit from your patch?
json is just a syntax. This is only part of the patch. The main feature is that we can directly, in a standard way, without the efforts of developers, translate composite values from user interfaces like psql or postgresql.conf into structures in C code. With this patch, the configuration system gains the ability to correctly manage the state of composite objects. This is important when you need to change 2 out of 5 fields at the same time so that the structure remains consistent. In addition, the new configuration module takes over the management of resources within the framework, which can be important for strings and dynamic arrays. There are other auxiliary features like hidden fields.
>It is not too big difference if I set value by SET command or by SELECT set_config()
Working with parameters is not limited to working within a session, otherwise the PGC_INTERNAL, PGC_POSTMASTER, and PGC_SIGHUP contexts would not be needed. My patch provides unified support for composite types and within such contexts. Example: you have a composite boot value and in the postgresql.conf file you need to change only 2 fields, and you need to do this at the same time to maintain the consistency of the structure. Now you would have to describe all the fields in one big line, and with the patch you can only describe the changed fields.
Best regards
Anton Chumak
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2025-09-23 04:39:28 | Re: [PATCH] Introduce unified support for composite GUC options |
Previous Message | Amit Kapila | 2025-09-23 04:25:16 | Re: issue with synchronized_standby_slots |