10000 Fix session auth reset handling. · postgrespro/postgres_cluster@e780704 · GitHub
[go: up one dir, main page]

Skip to content

Commit e780704

Browse files
committed
Fix session auth reset handling.
Fixes rowsecurity test.
1 parent 8eda1a5 commit e780704

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

contrib/mmts/multimaster.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3647,6 +3647,10 @@ static void MtmGucSet(VariableSetStmt *stmt, const char *queryStr)
36473647

36483648
case VAR_RESET:
36493649
{
3650+
if (strcmp(stmt->name, "session_authorization") == 0)
3651+
{
3652+
hash_search(MtmGucHash, "role", HASH_REMOVE, NULL);
3653+
}
36503654
key = pstrdup(stmt->name);
36513655
hash_search(MtmGucHash, key, HASH_REMOVE, NULL);
36523656
}
@@ -3675,11 +3679,6 @@ static void MtmGucDiscard(DiscardStmt *stmt)
36753679
}
36763680
}
36773681

3678-
static void MtmGucClear(void)
3679-
{
3680-
3681-
}
3682-
36833682
static char * MtmGucSerialize(void)
36843683
{
36853684
HASH_SEQ_STATUS status;
@@ -3869,9 +3868,6 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
38693868
if (stmt->kind == VAR_SET_MULTI)
38703869
skipCommand = true;
38713870

3872-
if (stmt->kind == VAR_RESET && strcmp(stmt->name, "session_authorization") == 0)
3873-
MtmGucClear();
3874-
38753871
if (!IsTransactionBlock())
38763872
{
38773873
skipCommand = true;

src/test/regress/serial_schedule

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ test: oidjoins
5050
test: type_sanity
5151
test: opr_sanity
5252
test: insert
53-
# test: insert_conflict
53+
test: insert_conflict
5454
test: create_function_1
5555
test: create_type
5656
test: create_table
@@ -111,7 +111,7 @@ test: collate
111111
test: matview
112112
test: lock
113113
test: replica_identity
114-
# test: rowsecurity # issue#20
114+
test: rowsecurity
115115
test: object_address
116116
test: tablesample
117117
test: groupingsets

0 commit comments

Comments
 (0)
0