From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Mark all GUC variable as PGDLLIMPORT |
Date: | 2021-08-23 14:07:16 |
Message-ID: | 20210823140716.GA31379@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Aug 22, 2021 at 09:29:01PM +0800, Julien Rouhaud wrote:
> On Sun, Aug 22, 2021 at 09:19:42AM -0400, Tom Lane wrote:
> >
> > Uh, no, it's exactly *not* clear. There are a lot of GUCs that are only
> > of interest to particular subsystems. I do not see why being a GUC makes
> > something automatically more interesting than any other global variable.
> > Usually, the fact that one is global is only so the GUC machinery itself
> > can get at it, otherwise it'd be static in the owning module.
> >
> > As for "extensions should be able to get at the values", the GUC machinery
> > already provides uniform mechanisms for doing that safely. Direct access
> > to the variable's internal value would be unsafe in many cases.
>
> Then shouldn't we try to prevent direct access on all platforms rather than
> only one?
Agreed. If Julian says 99% of the non-export problems are GUCs, and we
can just export them all, why not do it? We already export every global
variable on Unix-like systems, and we have seen no downsides.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2021-08-23 14:13:03 | Re: Queries that should be canceled will get stuck on secure_write function |
Previous Message | houzj.fnst@fujitsu.com | 2021-08-23 14:05:23 | RE: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION |