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

Commitae9aba6

Browse files
Keep rd_newRelfilenodeSubid across overflow.
Teach RelationCacheInvalidate() to keep rd_newRelfilenodeSubid across rel cachemessage overflows, so that behaviour is now fully deterministic.Noah Misch
1 parent42fa810 commitae9aba6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,8 +2163,14 @@ RelationCacheInvalidate(void)
21632163
/* Must close all smgr references to avoid leaving dangling ptrs */
21642164
RelationCloseSmgr(relation);
21652165

2166-
/* Ignore new relations, since they are never cross-backend targets */
2167-
if (relation->rd_createSubid!=InvalidSubTransactionId)
2166+
/*
2167+
* Ignore new relations; no other backend will manipulate them before
2168+
* we commit. Likewise, before replacing a relation's relfilenode, we
2169+
* shall have acquired AccessExclusiveLock and drained any applicable
2170+
* pending invalidations.
2171+
*/
2172+
if (relation->rd_createSubid!=InvalidSubTransactionId||
2173+
relation->rd_newRelfilenodeSubid!=InvalidSubTransactionId)
21682174
continue;
21692175

21702176
relcacheInvalsReceived++;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp