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

Commit649e856

Browse files
committed
In PrepareToInvalidateCacheTuple, don't force initialization of catalog
caches that we don't actually need to touch. This saves some trivialnumber of cycles and avoids certain cases of deadlock when doing concurrentVACUUM FULL on system catalogs. Per report from Gavin Roy.Backpatch to 8.2. In earlier versions, CatalogCacheInitializeCache didn'tlock the relation so there's no deadlock risk (though that certainly hadplenty of risks of its own).
1 parent91215f6 commit649e856

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 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/catcache.c,v 1.140 2008/01/01 19:45:53 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/cache/catcache.c,v 1.141 2008/03/05 17:01:26 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1781,13 +1781,13 @@ PrepareToInvalidateCacheTuple(Relation relation,
17811781

17821782
for (ccp=CacheHdr->ch_caches;ccp;ccp=ccp->cc_next)
17831783
{
1784+
if (ccp->cc_reloid!=reloid)
1785+
continue;
1786+
17841787
/* Just in case cache hasn't finished initialization yet... */
17851788
if (ccp->cc_tupdesc==NULL)
17861789
CatalogCacheInitializeCache(ccp);
17871790

1788-
if (ccp->cc_reloid!=reloid)
1789-
continue;
1790-
17911791
(*function) (ccp->id,
17921792
CatalogCacheComputeTupleHashValue(ccp,tuple),
17931793
&tuple->t_self,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp