[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of empty application_name #999

Merged
merged 2 commits into from
Jan 2, 2024
Merged

Fix handling of empty application_name #999

merged 2 commits into from
Jan 2, 2024

Conversation

JelteF
Copy link
Member
@JelteF JelteF commented Dec 22, 2023

It was reported in #993 that using an empty application_name on
connection startup could result in the actual application_name that was
set later not being detected. The reason was that we were explicitely
not forwarding empty strings from clients as settings to Postgres. This
is fixed by simply removing this check. Why we were explicitely ignoring
empty strings is not clear to me. One possible reason is because when
this code was introduced, the empty string was an invalid value for
all of the supported startup parameters. But our handling of startup
parameters and GUCs has heavily changed over the years, and is
able to handle them fine like this and the empty string is a valid
value for application_name.

Fixes #993

It was reported in #993 that using an empty `application_name` on
connection startup could result in the actual application_name that was
set later not being detected. The reason was that we were explicitely
not forwarding empty strings from clients as settings to Postgres. This
is fixed by simply removing this check. Why we were explicitely ignoring
empty strings is not clear to me. But our handling of startup parameters
and GUCs has heavily changed over the years, and is able to handle them
fine like this.
Copy link
Contributor
@emelsimsek emelsimsek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@JelteF JelteF merged commit 9d20ec5 into master Jan 2, 2024
6 of 7 checks passed
@JelteF JelteF deleted the fix-993 branch January 2, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants