Does Pgbouncer answer to kill command? Does Pgbouncer answer to kill command? kubernetes kubernetes

Does Pgbouncer answer to kill command?


There is a difference here. The killall -INT sends INT signal while kill sends TERM signal if no signal is specified. You can try again with kill -INT 1 to see whether it gets the same behavior. I think the pgbouncer process is also catching INT.

Here is reference to the site:

int cf_shutdown; /* 1 - wait for queries to finish, 2 - shutdown immediately */...static void handle_sigterm(evutil_socket_t sock, short flags, void *arg){    log_info("got SIGTERM, fast exit");    /* pidfile cleanup happens via atexit() */    exit(1);}    static void handle_sigint(evutil_socket_t sock, short flags, void *arg){    log_info("got SIGINT, shutting down");    sd_notify(0, "STOPPING=1");    if (cf_reboot)        die("takeover was in progress, going down immediately");    if (cf_pause_mode == P_SUSPEND)        die("suspend was in progress, going down immediately");    cf_pause_mode = P_PAUSE;    cf_shutdown = 1;}

Pgbouncer stops processing any more queries when the INT signal is given while the TERM signal will terminate the process immediately.