Re: warn if GUC set to an invalid shared library - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: warn if GUC set to an invalid shared library
Date
Msg-id 6f00b453-f716-4e73-93ec-67dd93025746@iki.fi
Whole thread Raw
In response to Re: warn if GUC set to an invalid shared library  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
I had a quick glance at this, and I agree with Robert's comment earlier 
that this requires a lot of context to understand.

Does this change the behavior of what is accepted or not? What are those 
cases? Can you give some examples, please?

When do you get the new warnings? Examples please.

Does this require documentation changes?

On 22/07/2024 19:28, Justin Pryzby wrote:
> And added a preparatory patch to distinguish ALTER USER/DATABASE SET
> from SET in a function, to avoid warning in that case.

The comment above enum GucSource needs updating.

PGC_S_TEST_FUNCTION is missing from GucSource_Names (there's a reminder 
of this in the comment above enum GucSource). Are there other places 
where PGC_S_TEST_FUNCTION is missing?

Do extensions need any changes for this? Consider renaming PGC_S_TEST 
too, to intentionally break any code that might now need to also check 
for PGC_S_TEST_FUNCTION.

Or perhaps there's a better way to distinguish between ALTER 
DATABASE/ROLE and CREATE FUNCTION settings. We already have different 
GucSource codes for per-database and per-user settings; I wonder if it 
would be better to use those codes and a separate "is_testing" flag. 
That would also naturally allow the combination of "source == PGC_S_FILE 
&& is_testing==true", if some settings would need different checks in 
ALTER SYSTEM for example.

-- 
Heikki Linnakangas
Neon (https://neon.tech)




pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Commit Timestamp and LSN Inversion issue
Next
From: Ashutosh Bapat
Date:
Subject: Re: Separate memory contexts for relcache and catcache