File tree 2 files changed +4
-0
lines changed
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -4493,6 +4493,7 @@ static void MtmGucInit(void)
4493
4493
{
4494
4494
HASHCTL hash_ctl ;
4495
4495
char * current_role ;
4496
+ MemoryContext oldcontext ;
4496
4497
4497
4498
MemSet (& hash_ctl , 0 , sizeof (hash_ctl ));
4498
4499
hash_ctl .keysize = GUC_KEY_MAXLEN ;
@@ -4507,9 +4508,11 @@ static void MtmGucInit(void)
4507
4508
* If current role is not equal to MtmDatabaseUser, than set it bofore
4508
4509
* any other GUC vars.
4509
4510
*/
4511
+ oldcontext = MemoryContextSwitchTo (TopMemoryContext );
4510
4512
current_role = GetConfigOptionByName ("session_authorization" , NULL , false);
4511
4513
if (strcmp (MtmDatabaseUser , current_role ) != 0 )
4512
4514
MtmGucUpdate ("session_authorization" , current_role );
4515
+ MemoryContextSwitchTo (oldcontext );
4513
4516
}
4514
4517
4515
4518
static void MtmGucDiscard ()
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ alter schema user1 owner to user1;
4
4
5
5
\c " user=user1 dbname=regression"
6
6
create table user1 .test(i int primary key );
7
+ create table user1 .test2(i int primary key );
7
8
8
9
\c " user=user1 dbname=regression port=5433"
9
10
select * from test;
You can’t perform that action at this time.
0 commit comments