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

Commit0b56be8

Browse files
committed
Found the problem with my operator-family changes: by fetching from
pg_opclass during LookupOpclassInfo(), I'd turned pg_opclass_oid_indexinto a critical system index. However the problem could only manifestduring a backend's first attempt to load opclass data, and then onlyif it had successfully loaded pg_internal.init and subsequently receiveda relcache flush; which made it impossible to reproduce in sequentialtests and darn hard even in parallel tests. Memo to self: whenexercising cache flush scenarios, must disable LookupOpclassInfo'sinternal cache too.
1 parent5725b9d commit0b56be8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.251 2006/12/23 00:43:11 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.252 2006/12/31 20:32:04 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2402,8 +2402,8 @@ RelationCacheInitializePhase2(void)
24022402

24032403
/*
24042404
* If we didn't get the critical system indexes loaded into relcache, do
2405-
* so now.These are critical because the catcachedepends on them for
2406-
*catcache fetches that are done during relcache load. Thus, we have an
2405+
* so now.These are critical because the catcacheand/or opclass cache
2406+
*depend on them for fetches done during relcache load. Thus, we have an
24072407
* infinite-recursion problem.We can break the recursion by doing
24082408
* heapscans instead of indexscans at certain key spots. To avoid hobbling
24092409
* performance, we only want to do that until we have the critical indexes
@@ -2439,13 +2439,14 @@ RelationCacheInitializePhase2(void)
24392439
LOAD_CRIT_INDEX(ClassOidIndexId);
24402440
LOAD_CRIT_INDEX(AttributeRelidNumIndexId);
24412441
LOAD_CRIT_INDEX(IndexRelidIndexId);
2442+
LOAD_CRIT_INDEX(OpclassOidIndexId);
24422443
LOAD_CRIT_INDEX(AccessMethodStrategyIndexId);
24432444
LOAD_CRIT_INDEX(AccessMethodProcedureIndexId);
24442445
LOAD_CRIT_INDEX(OperatorOidIndexId);
24452446
LOAD_CRIT_INDEX(RewriteRelRulenameIndexId);
24462447
LOAD_CRIT_INDEX(TriggerRelidNameIndexId);
24472448

2448-
#defineNUM_CRITICAL_INDEXES8/* fix if you change list above */
2449+
#defineNUM_CRITICAL_INDEXES9/* fix if you change list above */
24492450

24502451
criticalRelcachesBuilt= true;
24512452
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp