Re: Log connection establishment timings

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Melanie Plageman <melanieplageman(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, andrey(dot)chudnovskiy(at)microsoft(dot)com, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Subject: Re: Log connection establishment timings
Date: 2025-05-20 08:52:53
Message-ID: e1586594-3b69-4aea-87ce-73a7488cdc97@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12.03.25 16:43, Melanie Plageman wrote:
> On Tue, Mar 11, 2025 at 6:27 PM Melanie Plageman
> <melanieplageman(at)gmail(dot)com> wrote:
>>
>> I did more manual testing of my patches, and I think they are mostly
>> ready for commit except for the IsConnectionBackend() macro (if we
>> have something to change it to).
>
> I've committed this and marked it as such in the CF app.
> Thanks to everyone for the review.

log_connections has been changed from a Boolean parameter to a string
one, but a number of places in the documentation and in various pieces
of test code still use the old values. I think it would be better if
they were adjusted to the new style.

There are two places in doc/src/sgml/config.sgml where
log_connections=yes is used as an example. This is a relatively
prominent place, so it should not use deprecated values.

In src/backend/tcop/postgres.c, there is a call

SetConfigOption("log_connections", "true", context, source);

that could be adjusted.

Various uses in test code:

src/interfaces/libpq/t/005_negotiate_encryption.pl
src/test/authentication/t/001_password.pl
src/test/authentication/t/003_peer.pl
src/test/authentication/t/005_sspi.pl
src/test/authentication/t/007_pre_auth.pl
src/test/kerberos/t/001_auth.pl
src/test/ldap/t/001_auth.pl
src/test/ldap/t/002_bindpasswd.pl
src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl
src/test/modules/oauth_validator/t/001_server.pl
src/test/modules/oauth_validator/t/002_client.pl
src/test/postmaster/t/002_connection_limits.pl
src/test/postmaster/t/003_start_stop.pl
src/test/recovery/t/013_crash_restart.pl
src/test/recovery/t/022_crash_temp_files.pl
src/test/recovery/t/032_relfilenode_reuse.pl
src/test/recovery/t/037_invalid_database.pl
src/test/ssl/t/SSL/Server.pm
src/tools/ci/pg_ci_base.conf

I suspect in some of these cases using one of the new more granular
values would be appropriate? This could also serve as examples and
testing of the parameter itself.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2025-05-20 09:03:52 Re: queryId constant squashing does not support prepared statements
Previous Message Michael Paquier 2025-05-20 08:47:32 Re: Regression in statement locations