From 6679e5939426e23d4fc6f719c3a7de41d2aa07e2 Mon Sep 17 00:00:00 2001 From: Rahim Kanji Date: Tue, 26 Nov 2024 02:19:27 +0500 Subject: [PATCH] Added START_REPLICATION command --- include/proxysql_structs.h | 1 + lib/PgSQL_Query_Processor.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/proxysql_structs.h b/include/proxysql_structs.h index 47b149081..b9cbf6623 100644 --- a/include/proxysql_structs.h +++ b/include/proxysql_structs.h @@ -609,6 +609,7 @@ enum PGSQL_QUERY_command { PGSQL_QUERY_ALTER_TABLESPACE, PGSQL_QUERY_DROP_TABLESPACE, PGSQL_QUERY_CLUSTER, + PGSQL_QUERY_START_REPLICATION, PGSQL_QUERY_UNKNOWN, PGSQL_QUERY__UNINITIALIZED, PGSQL_QUERY___NONE // Special marker. diff --git a/lib/PgSQL_Query_Processor.cpp b/lib/PgSQL_Query_Processor.cpp index e4fa0038e..046c21fb9 100644 --- a/lib/PgSQL_Query_Processor.cpp +++ b/lib/PgSQL_Query_Processor.cpp @@ -164,6 +164,7 @@ static char* commands_counters_desc[PGSQL_QUERY___NONE] = { [PGSQL_QUERY_ALTER_TABLESPACE] = (char*)"ALTER_TABLESPACE", [PGSQL_QUERY_DROP_TABLESPACE] = (char*)"DROP_TABLESPACE", [PGSQL_QUERY_CLUSTER] = (char*)"PGSQL_QUERY_CLUSTER", + [PGSQL_QUERY_START_REPLICATION] = (char*)"START_REPLICATION", [PGSQL_QUERY_UNKNOWN] = (char*)"UNKNOWN", }; @@ -1104,6 +1105,10 @@ __remove_parenthesis: if (token != NULL && !strcasecmp("TRANSACTION", token)) ret = PGSQL_QUERY_BEGIN; break; } + if (!strcasecmp("START_REPLICATION", token)) { + ret = PGSQL_QUERY_START_REPLICATION; + break; + } break; case 't': case 'T':