projects
/
pgpool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56f4cf3
)
Deal with PostgreSQL 14 while processing pg_terminate_backend().
author
Tatsuo Ishii
<ishii@sraoss.co.jp>
Tue, 16 Nov 2021 00:45:31 +0000
(09:45 +0900)
committer
Tatsuo Ishii
<ishii@sraoss.co.jp>
Tue, 16 Nov 2021 00:48:37 +0000
(09:48 +0900)
Do not reject two arguments form of pg_terminate_backend() as
PostgreSQL 14 or after accept two arguments.
src/utils/pool_select_walker.c
patch
|
blob
|
blame
|
history
diff --git
a/src/utils/pool_select_walker.c
b/src/utils/pool_select_walker.c
index 29fd05a9387d7ba1eb4f2b04534c7b3c1ff13fbe..a2404644f95d4e4518bfe10f5a6b30c30d95ec70 100644
(file)
--- a/
src/utils/pool_select_walker.c
+++ b/
src/utils/pool_select_walker.c
@@
-332,7
+332,9
@@
static bool function_call_walker(Node *node, void *context)
if (ctx->pg_terminate_backend_pid == 0 && strcmp("pg_terminate_backend", fname) == 0)
{
- if (list_length(fcall->args) == 1)
+ /* PostgreSQL 14 or after accept two arguments. */
+ if (list_length(fcall->args) == 1 ||
+ list_length(fcall->args) == 2)
{
Node *arg = linitial(fcall->args);
if (IsA(arg, A_Const) &&