1- # Example systemd service unit for PgBouncer
2- #
3- # - Adjust the paths in ExecStart for your installation.
4- #
5- # - The User setting requires careful consideration. PgBouncer needs
6- # to be able to place a Unix-domain socket file where PostgreSQL
7- # clients will look for it. In the olden days, this was in /tmp,
8- # but systems using systemd now prefer something like
9- # /var/run/postgresql/. But then some systems also lock down that
10- # directory so that only the postgres user can write to it. That
11- # means you need to either
12- #
13- # - run PgBouncer as the postgres user, or
14- #
15- # - create a separate user and add it to the postgres group and
16- # make /var/run/postgresql/ group-writable, or
17- #
18- # - use systemd to create the sockets; see pgbouncer.socket nearby.
19- #
20- # For packagers and deployment systems, this requires some
21- # coordination between the PgBouncer and the PostgreSQL
22- # packages/components.
23- #
241[Unit]
252Description=connection pooler for PostgreSQL
263Documentation=man:pgbouncer(1)
274Documentation=https://www.pgbouncer.org/
285After=network.target
29- #Requires=pgbouncer.socket
6+ {% if supabase_internal is defined %}
7+ Requires=generate-optimizations.service
8+ After=generate-optimizations.service
9+ {% endif %}
3010
3111[Service]
3212Type=notify
3313User=pgbouncer
3414ExecStart=/usr/local/bin/pgbouncer /etc/pgbouncer/pgbouncer.ini
3515ExecReload=/bin/kill -HUP $MAINPID
3616KillSignal=SIGINT
37- # LimitNOFILE=1024
17+ LimitNOFILE=65536
3818
3919[Install]
40- WantedBy=multi-user.target
20+ WantedBy=multi-user.target
0 commit comments