修复pid截断导致enable_kill_query参数不能正常使用的问题
This commit is contained in:
@ -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;
|
||||
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user