út 23. 9. 2025 v 6:33 odesílatel Чумак Антон <[email protected]> napsal:
> >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. > How common are composites in configuration? It goes against the simplicity of configuration. And if you really need it - you can use plpgsql code and set_config function. > > >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. > your patch does just parsing. At the end, you still need to validate values. > > Best regards > > Anton Chumak > > >
