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

Commit0c19aab

Browse files
committed
Ooops, I broke initdb with that last patch.
That's what I get for not fully retesting the final version of the patch.The replace_allowed cross-check needs an additional special case forbootstrapping.
1 parent078b2ed commit0c19aab

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ do { \
181181
HASH_ENTER, &found); \
182182
if (found) \
183183
{ \
184-
/*this can happen,see comments in RelationBuildDesc */ \
184+
/* see comments in RelationBuildDesc and RelationBuildLocalRelation */ \
185185
Relation_old_rel=hentry->reldesc; \
186186
Assert(replace_allowed); \
187187
hentry->reldesc= (RELATION); \
188188
if (RelationHasReferenceCountZero(_old_rel)) \
189189
RelationDestroyRelation(_old_rel, false); \
190-
else \
190+
elseif (!IsBootstrapProcessingMode())\
191191
elog(WARNING,"leaking still-referenced relcache entry for \"%s\"", \
192192
RelationGetRelationName(_old_rel)); \
193193
} \
@@ -2861,9 +2861,15 @@ RelationBuildLocalRelation(const char *relname,
28612861
RelationInitPhysicalAddr(rel);
28622862

28632863
/*
2864-
* Okay to insert into the relcache hash tables.
2864+
* Okay to insert into the relcache hash table.
2865+
*
2866+
* Ordinarily, there should certainly not be an existing hash entry for
2867+
* the same OID; but during bootstrap, when we create a "real" relcache
2868+
* entry for one of the bootstrap relations, we'll be overwriting the
2869+
* phony one created with formrdesc. So allow that to happen for nailed
2870+
* rels.
28652871
*/
2866-
RelationCacheInsert(rel,false);
2872+
RelationCacheInsert(rel,nailit);
28672873

28682874
/*
28692875
* Flag relation as needing eoxact cleanup (to clear rd_createSubid). We

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp