Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ed7ab1

Browse files
committed
Merge branch 'PGPROEE9_6_atx' into PGPROEE9_6
2 parentsaceada0 +517289c commit2ed7ab1

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

‎src/backend/access/transam/multixact.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ mXactCachePut(MultiXactId multi, int nmembers, MultiXactMember *members)
13781378
{
13791379
/* The cache only lives as long as the current transaction */
13801380
debug_elog2(DEBUG2,"CachePut: initializing memory context");
1381-
MXactContext=AllocSetContextCreate(TopTransactionContext,
1381+
MXactContext=AllocSetContextCreate(TopMemoryContext,
13821382
"MultiXact cache context",
13831383
ALLOCSET_SMALL_SIZES);
13841384
}
@@ -1484,7 +1484,11 @@ AtEOXact_MultiXact(void)
14841484
* Discard the local MultiXactId cache. Since MXactContext was created as
14851485
* a child of TopTransactionContext, we needn't delete it explicitly.
14861486
*/
1487-
MXactContext=NULL;
1487+
if (MXactContext)
1488+
{
1489+
MemoryContextDelete(MXactContext);
1490+
MXactContext=NULL;
1491+
}
14881492
dlist_init(&MXactCache);
14891493
MXactCacheMembers=0;
14901494
}
@@ -1551,7 +1555,11 @@ PostPrepare_MultiXact(TransactionId xid)
15511555
/*
15521556
* Discard the local MultiXactId cache like in AtEOX_MultiXact
15531557
*/
1554-
MXactContext=NULL;
1558+
if (MXactContext)
1559+
{
1560+
MemoryContextDelete(MXactContext);
1561+
MXactContext=NULL;
1562+
}
15551563
dlist_init(&MXactCache);
15561564
MXactCacheMembers=0;
15571565
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp