Re: GUC thread-safety approaches - Mailing list pgsql-hackers

From David Rowley
Subject Re: GUC thread-safety approaches
Date
Msg-id CAApHDvrhvwycDXzQQS_nox2sB03NRqXjZ_y3EssBSf8cn6sL1g@mail.gmail.com
Whole thread Raw
In response to GUC thread-safety approaches  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: GUC thread-safety approaches
List pgsql-hackers
On Tue, 18 Nov 2025 at 21:50, Peter Eisentraut <peter@eisentraut.org> wrote:
> where get_config_val_*() would be a thin wrapper around hash_search()
> (a bit like the existing GetConfigOption() and find_option(), but
> without all the error checking).
>
> Would that be too expensive?

Why couldn't in-core GUCs be fields in the Session struct and have a
hash table for storage of custom GUCs, and allow core to access the
fields directly? Extensions would need to go through a function which
does the hash lookup.

David



pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: [PATCH] Fixed creation of empty .log files during log rotation
Next
From: Masahiko Sawada
Date:
Subject: Re: [PATCH] Add memory usage reporting to VACUUM VERBOSE