Bug 271023 - databases/pgbouncer: Stop-signal customization for graceful shutdown
Summary: databases/pgbouncer: Stop-signal customization for graceful shutdown
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL: https://www.pgbouncer.org/usage.html
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-23 12:41 UTC by Dmitry Wagin
Modified: 2023-04-23 17:20 UTC (History)
1 user (show)

See Also:


Attachments
pgbouncer.diff (1.34 KB, patch)
2023-04-23 12:41 UTC, Dmitry Wagin
dmitry.wagin: maintainer-approval+
Details | Diff
pgbouncer.diff (1.55 KB, patch)
2023-04-23 12:47 UTC, Dmitry Wagin
dmitry.wagin: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Wagin 2023-04-23 12:41:26 UTC
Created attachment 241673 [details]
pgbouncer.diff

Stop-signal customization for graceful shutdown

SIGINT
    Safe shutdown. Same as issuing PAUSE and SHUTDOWN on the console.
SIGTERM (FreeBSD default)
    Immediate shutdown. Same as issuing SHUTDOWN on the console.
Comment 1 Dmitry Wagin 2023-04-23 12:47:17 UTC
Created attachment 241674 [details]
pgbouncer.diff

Added gracefulstop command
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2023-04-23 15:30:14 UTC
Why can't you just make the normal stop command perform the graceful shutdown?  Is there a technical reason for providing a separate rc script command?
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2023-04-23 17:19:49 UTC
Thank you for your contribution.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-04-23 17:20:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e7de14f3bb723e71746fb2179aafbe8d897c0b62

commit e7de14f3bb723e71746fb2179aafbe8d897c0b62
Author:     Dmitry Wagin <dmitry.wagin@ya.ru>
AuthorDate: 2023-04-23 15:28:39 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-04-23 17:17:49 +0000

    databases/pgbouncer: add a graceful stop command to rc script

    The user can now terminate pgbouncer both with gracefulstop
    (sends SIGINT) and with stop (sends SIGTERM).

    PR:             271023

 databases/pgbouncer/Makefile           |  1 +
 databases/pgbouncer/files/pgbouncer.in | 18 +++++++++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)