diff --git a/src/backend/distributed/commands/citus_global_signal.c b/src/backend/distributed/commands/citus_global_signal.c index 8f33f91b7..74a29a8a9 100644 --- a/src/backend/distributed/commands/citus_global_signal.c +++ b/src/backend/distributed/commands/citus_global_signal.c @@ -24,6 +24,8 @@ static bool CitusSignalBackend(uint64 globalPID, uint64 timeout, int sig); PG_FUNCTION_INFO_V1(pg_cancel_backend); PG_FUNCTION_INFO_V1(pg_terminate_backend); +PG_FUNCTION_INFO_V1(citus_cancel_backend); +PG_FUNCTION_INFO_V1(citus_terminate_backend); /* * pg_cancel_backend overrides the Postgres' pg_cancel_backend to cancel @@ -48,6 +50,18 @@ pg_cancel_backend(PG_FUNCTION_ARGS) } +/* + * citus_cancel_backend is needed to make the pg_cancel_backend SQL function + * still work after downgrading from 11.1, which changed its definition to call + * a different symbol. See #6300/e29db74 for details. + */ +Datum +citus_cancel_backend(PG_FUNCTION_ARGS) +{ + return pg_cancel_backend(fcinfo); +} + + /* * pg_terminate_backend overrides the Postgres' pg_terminate_backend to terminate * a query with a global pid so a query can be terminated from another node. @@ -71,6 +85,18 @@ pg_terminate_backend(PG_FUNCTION_ARGS) } +/* + * citus_terminate_backend is needed to make the pg_terminate_backend SQL + * function still work after downgrading from 11.1, which changed its + * definition to call a different symbol. See #6300/e29db74 for details + */ +Datum +citus_terminate_backend(PG_FUNCTION_ARGS) +{ + return pg_terminate_backend(fcinfo); +} + + /* * CitusSignalBackend gets a global pid and and ends the original query with the global pid * that might have started in another node by connecting to that node and running either