Skip to content

Commit

Permalink
[#23655] YSQL: Handle SIGTERM in pg_cron
Browse files Browse the repository at this point in the history
Summary:
Use `quickdie` as `SIGTERM` handler since the process gets stuck on `SPI_execute_with_args` in `InsertJobRunDetail` when `die` or `pg_cron_sigterm` is used.

Fixes #23655
Jira: DB-12566

Test Plan:
Jenkins

ybd fastdebug --cxx-test integration-tests_pg_cron-test --gtest_filter PgCronTest.ChangeCronDB -n 100 --tp 1

Reviewers: tnayak

Reviewed By: tnayak

Subscribers: yql, svc_phabricator, ybase

Differential Revision: https://phorge.dev.yugabyte.com/D37591
  • Loading branch information
hari90 committed Aug 29, 2024
1 parent 51608d8 commit 4b4c201
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/postgres/third-party-extensions/pg_cron/src/pg_cron.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ PgCronLauncherMain(Datum arg)
pqsignal(SIGHUP, pg_cron_sighup);
pqsignal(SIGINT, SIG_IGN);
/* YB Note: Exit immediately. */
pqsignal(SIGTERM, die);
pqsignal(SIGTERM, quickdie);
pqsignal(SIGQUIT, quickdie);

/* We're now ready to receive signals */
Expand Down

0 comments on commit 4b4c201

Please sign in to comment.