Re: Forgive trailing semicolons inside of config files - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Forgive trailing semicolons inside of config files
Date
Msg-id 2509700.1689089651@sss.pgh.pa.us
Whole thread Raw
In response to Re: Forgive trailing semicolons inside of config files  (Isaac Morland <isaac.morland@gmail.com>)
List pgsql-hackers
Isaac Morland <isaac.morland@gmail.com> writes:
> On Tue, 11 Jul 2023 at 10:43, Greg Sabino Mullane <htamfids@gmail.com>
>> # Add settings for extensions here
>> random_page_cost = 2.5;
>>
>> Boom! Server will not start. Surely, we can be a little more liberal in
>> what we accept? Attached patch allows a single trailing semicolon to be
>> silently discarded.

> Please, no!

I agree.  Allowing this would create huge confusion about whether it's
EOL or semicolon that ends a config file entry.  If you can write a
semicolon, then why not spread an entry across lines, or write
multiple entries on one line?

It seems possible that someday we might want to convert over to
semicolon-is-end-of-entry precisely to allow such cases.  But
I think that if/when we do that, it should be a flag day where you
*must* change to the new syntax.  (We did exactly that in pgbench
scripts some years ago, and people didn't complain too much.)

> Or maybe there could be a "check configuration" subcommand which checks the
> configuration.

We have such a thing, see the pg_file_settings view.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: Latches vs lwlock contention
Next
From: Andres Freund
Date:
Subject: Re: Performance degradation on concurrent COPY into a single relation in PG16.