From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
---|---|
To: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>, andrey(dot)chudnovskiy(at)microsoft(dot)com, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> |
Subject: | Re: Log connection establishment timings |
Date: | 2025-02-28 05:54:44 |
Message-ID: | Z8FPpJPDLHWNuV2c@ip-10-97-1-34.eu-west-3.compute.internal |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Thu, Feb 27, 2025 at 05:55:19PM -0500, Melanie Plageman wrote:
> On Thu, Feb 27, 2025 at 11:30 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> >
> > On 2025-02-27 11:08:04 -0500, Melanie Plageman wrote:
> >
> > > However, since that is a bigger project (with more refactoring, etc),
> > > he suggested that we change log_connections to a GUC_LIST
> > > (ConfigureNamesString) with options like "none", "received,
> > > "authenticated", "authorized", "all".
> >
> > Yep.
>
> I've done a draft of this in attached v7 (see 0001).
Thanks for the patch!
> It still needs polishing (e.g. I need to figure out where to put the new guc hook
> functions and enums and such)
yeah, I wonder if it would make sense to create new dedicated "connection_logging"
file(s).
>, but I want to see if this is a viable direction forward.
>
> I'm worried the list of possible connection log messages could get
> unwieldy if we add many more.
Thinking out loud, I'm not sure we'd add "many more" but maybe what we could do
is to introduce some predefined groups like:
'basic' (that would be equivalent to 'received, + timings introduced in 0002')
'security' (equivalent to 'authenticated,authorized')
Not saying we need to create this kind of predefined groups now, just an idea
in case we'd add many more: that could "help" the user experience, or are you
more concerned about the code maintenance?
Just did a quick test, (did not look closely at the code), and it looks like
that:
'all': does not report the "received" (but does report authenticated and authorized)
'received': does not work?
'authenticated': works
'authorized': works
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Sagar Shedge | 2025-02-28 06:10:39 | Re: Extend postgres_fdw_get_connections to return remote backend pid |
Previous Message | Tom Lane | 2025-02-28 05:43:17 | Re: Remove extra Sort node above a btree-compatible Index Scan |