Skip to content

Make logging configurable #15

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

Merged
merged 4 commits into from
Aug 19, 2021

Conversation

sdudoladov
Copy link
Contributor

  1. Fix the bug with the auth_mon_lock released twice after logging pg_auth_mon data.

log_pg_auth_mon_data() acquires and releases the auth_mon_lock. The original PR had the return after a call to log_pg_auth_mon_data() to prevent the second LWLockRelease(auth_mon_lock);
This return was dropped during merging.

The bug manifest as the inability to connect to a PG server with the following error logged immediately after pg_auth_mon data:

2021-08-18 14:54:48.366 CEST [152859] FATAL:  lock auth_mon_lock is not held

To fix it manually, remove pg_auth_mon from shared_preload_libraries and restart the PG instance.

  1. Introduce the pg_auth_mon.log_period GUC variable to manage the frequency of logging. The value is measured in minutes; only non-negative values up to 10080 (length of one week) are accepted. The value of zero means logging is disabled.

@CyberDem0n
Copy link
Contributor

👍

@RafiaSabih RafiaSabih merged commit 437435b into RafiaSabih:master Aug 19, 2021
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.

3 participants