Re: Mark all GUC variable as PGDLLIMPORT - Mailing list pgsql-hackers

From Julien Rouhaud
Subject Re: Mark all GUC variable as PGDLLIMPORT
Date
Msg-id CAOBaU_b0vBi1ua6f3_3O2LC3OEdrv-mhAnVXxmP7OVFwkAO3jA@mail.gmail.com
Whole thread Raw
In response to Re: Mark all GUC variable as PGDLLIMPORT  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On Tue, Aug 24, 2021 at 12:36 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
>
> There are few GUC variables, where we need extra fast access - work_mem, encoding settings, and maybe an application
name.For others I hadn't needed to access it for over 20 years. But I understand that more complex extensions like
timescaledbwill use more internal GUC. 

Note that even trivial extensions require some other GUC access.  For
instance any single extension that wants to aggregate data based on
the query_id has to store an array of query_id in shmem to know what a
parallel worker is working on.  On top of wasting memory and CPU, it
also means that computing the maximum number of backends in required.
So you need to recompute MaxBackends, which means access to multiple
GUCs.

Unfortunately the patch to expose the query_id didn't fix that problem
as it only passes the top level query_id to the pararllel workers, not
the current one.



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Mark all GUC variable as PGDLLIMPORT
Next
From: Fujii Masao
Date:
Subject: Re: Queries that should be canceled will get stuck on secure_write function