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

PgBouncer: Use the RuntimeDirectory option in the systemd unit file. #506

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

vitabaks
Copy link
Owner

In this update, we have transitioned from using PermissionsStartOnly and ExecStartPre to RuntimeDirectory and RuntimeDirectoryMode in the systemd unit files for the pgBouncer service. This change aims to improve the management of service runtime directories and ensure a more robust and modern configuration.

Details of the Changes:

1. Deprecation of PermissionsStartOnly:

  • The PermissionsStartOnly directive was deprecated in newer versions of systemd, necessitating a reevaluation of how temporary directories and files for pgBouncer are created and managed.

2. Implementation of RuntimeDirectory:

  • Utilizing RuntimeDirectory allows systemd to automatically create and manage temporary directories for services. This simplifies configuration and reduces the likelihood of errors.
  • RuntimeDirectory ensures that necessary directories are created before the service starts and removed after it stops.

3. Setting RuntimeDirectoryMode:

  • By setting RuntimeDirectoryMode, we explicitly define the access permissions for the created temporary directories, enhancing security and predictability.

4. Improved Reliability and Compatibility:

  • These changes bring the systemd configuration in line with the latest standards and practices, improving compatibility across various system environments.

Conclusion:

The shift to using RuntimeDirectory and RuntimeDirectoryMode in systemd unit files for pgBouncer provides a more reliable, secure, and contemporary configuration. This simplifies the management of the service's resources and enhances its stability in operational environments.

@vitabaks vitabaks self-assigned this Nov 18, 2023
@vitabaks vitabaks merged commit c6c2f35 into master Nov 18, 2023
17 checks passed
@vitabaks vitabaks deleted the pgbouncer-runtime-directory branch November 18, 2023 11:16
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.

1 participant