Skip to content

Commit

Permalink
Improve pgbouncer systemd unit
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Oct 31, 2024
1 parent 4f27e79 commit 1a6a107
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
16 changes: 9 additions & 7 deletions specs/pgbouncer/SOURCES/pgbouncer.service
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
[Unit]
Description=A lightweight connection pooler for PostgreSQL
Documentation=man:pgbouncer(1)
Documentation=https://www.pgbouncer.org
After=network-online.target
Wants=network-online.target

[Service]
RemainAfterExit=yes
Type=notify
TimeoutSec=300

User=pgbouncer
Group=pgbouncer

Environment=BOUNCERCONF=/etc/pgbouncer/pgbouncer.ini

ExecStart=/usr/bin/pgbouncer -q ${BOUNCERCONF}
ExecReload=/usr/bin/pgbouncer -R -q ${BOUNCERCONF}
EnvironmentFile=-/etc/sysconfig/pgbouncer
ExecStart=/usr/bin/pgbouncer ${BOUNCERCONF}
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGINT
Restart=on-failure

# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300

[Install]
WantedBy=multi-user.target
9 changes: 6 additions & 3 deletions specs/pgbouncer/pgbouncer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
Summary: Lightweight connection pooler for PostgreSQL
Name: pgbouncer
Version: 1.23.1
Release: 0%{?dist}
Release: 1%{?dist}
License: MIT and BSD
Group: Applications/Databases
URL: https://pgbouncer.github.io
URL: https://www.pgbouncer.org

Source0: https://pgbouncer.github.io/downloads/files/%{version}/%{name}-%{version}.tar.gz
Source0: https://www.pgbouncer.org/downloads/files/%{version}/%{name}-%{version}.tar.gz
Source1: %{name}.service
Source2: %{name}.logrotate
Source3: %{name}.pam
Expand Down Expand Up @@ -145,6 +145,9 @@ fi
################################################################################

%changelog
* Thu Oct 31 2024 Anton Novojilov <[email protected]> - 1.23.1-1
- Improve systemd unit file

* Mon Sep 09 2024 Anton Novojilov <[email protected]> - 1.23.1-0
- https://www.pgbouncer.org/changelog.html#pgbouncer-123x

Expand Down

0 comments on commit 1a6a107

Please sign in to comment.