修复pid截断导致enable_kill_query参数不能正常使用的问题

This commit is contained in:
siven
2021-02-08 10:48:38 +08:00
parent 6b90131ab8
commit 10fc44fc94
3 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@
#include "pgxc/pgxc.h"
#endif
extern void cancel_backend(Oid pid);
extern void cancel_backend(ThreadId pid);
#define atooid(x) ((Oid)strtoul((x), NULL, 10))
/*
@ -924,7 +924,7 @@ Datum pg_test_err_contain_err(PG_FUNCTION_ARGS)
// Signal to cancel a backend process. This is allowed if you are superuser
// or have the same role as the process being canceled.
void cancel_backend(Oid pid)
void cancel_backend(ThreadId pid)
{
int sig_return = 0;

View File

@ -100,7 +100,7 @@ static List* GetCancelQuery(const char* user_name);
static bool IsEligiblePid(Oid rel_oid, Oid nsp_oid, Oid pid, Oid db_oid, Form_pg_class form, List* query_list);
static bool IsDuplicatePid(const List* query_list, Oid pid);
static void CancelQuery(const char* user_name);
extern void cancel_backend(Oid pid);
extern void cancel_backend(ThreadId pid);
static bool IsCurrentSchemaAttachRoles(List* roles);
/* Database Security: Support password complexity */

View File

@ -18,7 +18,7 @@
#define PASSWORD_TYPE_PLAINTEXT 0
#define PASSWORD_TYPE_MD5 1
typedef struct LockInfoBuck {
Oid pid;
ThreadId pid;
Oid relation;
Oid database;
Oid nspoid;