Skip to content

Commit dd6023c

Browse files
committed
clear GucBuffer on reset session
1 parent 1da0763 commit dd6023c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

contrib/mmts/multimaster.c

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

3009+
static void MtmGUCBufferClear(void)
3010+
{
3011+
if (MtmGUCBufferAllocated)
3012+
{
3013+
resetStringInfo(MtmGUCBuffer);
3014+
MtmGUCBufferAppend("");
3015+
}
3016+
}
3017+
30093018
static bool MtmProcessDDLCommand(char const* queryString)
30103019
{
30113020
char *queryWithContext;
@@ -3175,6 +3184,9 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
31753184
if (stmt->kind == VAR_SET_MULTI)
31763185
skipCommand = true;
31773186

3187+
if (stmt->kind == VAR_RESET && strcmp(stmt->name, "session_authorization") == 0)
3188+
MtmGUCBufferClear();
3189+
31783190
if (!IsTransactionBlock())
31793191
{
31803192
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