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

Commit42c80c6

Browse files
committed
Assert that syscache lookups don't happen outside transactions.
Andres Freund
1 parentac33c7e commit42c80c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/backend/utils/cache/catcache.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include"access/sysattr.h"
2222
#include"access/tuptoaster.h"
2323
#include"access/valid.h"
24+
#include"access/xact.h"
2425
#include"catalog/pg_operator.h"
2526
#include"catalog/pg_type.h"
2627
#include"miscadmin.h"
@@ -1067,6 +1068,9 @@ SearchCatCache(CatCache *cache,
10671068
SysScanDescscandesc;
10681069
HeapTuplentp;
10691070

1071+
/* Make sure we're in a xact, even if this ends up being a cache hit */
1072+
Assert(IsTransactionState());
1073+
10701074
/*
10711075
* one-time startup overhead for each cache
10721076
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp