Skip to content

Conversation

sdudoladov
Copy link
Owner

this patch removes 'log_connections' and 'log_disconnections' in favor
of 'log_connection_messages', thereby introducing incompatibility

Author: Sergey Dudoladov

Reviewed-by:

Discussion:
https://www.postgresql.org/message-id/flat/CAA8Fd-qCB96uwfgMKrzfNs32mqqysi53yZFNVaRNJ6xDthZEgA%40mail.gmail.com

@sdudoladov sdudoladov force-pushed the make-logging-connections-fine-grained branch 2 times, most recently from 355a9f6 to 471f295 Compare September 19, 2022 15:45

*extra = (void *) myextra;

if (log_connection_messages == NULL || log_connection_messages[0] == '\0') {

Choose a reason for hiding this comment

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

SplitIdentifierString already considers empty strings as ok, can't we get rid of this string?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I've decided to keep it for now for the sake of being explicit in the code

@hughcapet
Copy link

+ tests should be extended to check the new GUC values, I guess

@sdudoladov
Copy link
Owner Author

sdudoladov commented Oct 24, 2022

  • tests should be extended to check the new GUC values, I guess

yes, but let's wait with that untl the 1st round of feedback from the community

@sdudoladov sdudoladov force-pushed the make-logging-connections-fine-grained branch from 471f295 to 7531ac9 Compare October 24, 2022 19:26
@sdudoladov
Copy link
Owner Author

relevant refactoring

@sdudoladov sdudoladov force-pushed the make-logging-connections-fine-grained branch 2 times, most recently from 0a20d43 to 2dca2c6 Compare October 25, 2022 19:29
@sdudoladov sdudoladov force-pushed the make-logging-connections-fine-grained branch 2 times, most recently from aea7a4c to efafdb4 Compare January 18, 2023 07:16
@sdudoladov sdudoladov force-pushed the make-logging-connections-fine-grained branch 3 times, most recently from b85e0e4 to 4bf99bc Compare January 30, 2023 18:04
@hughcapet
Copy link

if (pg_strcasecmp(*newval, "all") == 0)
{
newlogconnect |= LOG_CONNECTION_ALL;
myextra = (int *) guc_malloc(ERROR, sizeof(int));

Choose a reason for hiding this comment

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

shouldn't we check if myextra is NULL

Copy link
Owner Author

Choose a reason for hiding this comment

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

@sdudoladov
Copy link
Owner Author

This patch removes 'log_connections' and 'log_disconnections'
in favor of 'log_connection_messages', thereby introducing incompatibility

Author: Sergey Dudoladov

Reviewed-by: Justin Pryzby

Discussion:
https://www.postgresql.org/message-id/flat/CAA8Fd-qCB96uwfgMKrzfNs32mqqysi53yZFNVaRNJ6xDthZEgA%40mail.gmail.com
@sdudoladov sdudoladov force-pushed the make-logging-connections-fine-grained branch from 4bf99bc to 49a2ea5 Compare February 1, 2023 19:50
@sdudoladov sdudoladov closed this Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants