Skip to content

Commit b991096

Browse files
committed
clear GucBuffer on reset session
1 parent c431162 commit b991096

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

multimaster.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3133,6 +3133,15 @@ static char * MtmGUCBufferGet(void){
31333133
return MtmGUCBuffer->data;
31343134
}
31353135

3136+
static void MtmGUCBufferClear(void)
3137+
{
3138+
if (MtmGUCBufferAllocated)
3139+
{
3140+
resetStringInfo(MtmGUCBuffer);
3141+
MtmGUCBufferAppend("");
3142+
}
3143+
}
3144+
31363145
static bool MtmProcessDDLCommand(char const* queryString)
31373146
{
31383147
char *queryWithContext;
@@ -3298,6 +3307,9 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
32983307
if (stmt->kind == VAR_SET_MULTI)
32993308
skipCommand = true;
33003309

3310+
if (stmt->kind == VAR_RESET && strcmp(stmt->name, "session_authorization") == 0)
3311+
MtmGUCBufferClear();
3312+
33013313
if (!IsTransactionBlock())
33023314
{
33033315
skipCommand = true;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy