Content-Length: 274320 | pFad | http://github.com/postgrespro/postgres_cluster/commit/90fd3bfd17070d3c2467a45204ede17b70a15387

83 Limit depth of forced recursion for CLOBBER_CACHE_RECURSIVELY. · postgrespro/postgres_cluster@90fd3bf · GitHub
Skip to content

Commit 90fd3bf

Browse files
committed
Limit depth of forced recursion for CLOBBER_CACHE_RECURSIVELY.
It's somewhat surprising that we got away with this before. (Actually, since nobody tests this routinely AFAIK, it might've been broken for awhile. But it's definitely broken in the wake of commit f868a81.) It seems sufficient to limit the forced recursion to a small number of levels. Back-patch to all supported branches, like the preceding patch. Discussion: https://postgr.es/m/12259.1532117714@sss.pgh.pa.us
1 parent 2569ca0 commit 90fd3bf

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/backend/utils/cache/inval.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,17 @@ AcceptInvalidationMessages(void)
708708
}
709709
}
710710
#elif defined(CLOBBER_CACHE_RECURSIVELY)
711-
InvalidateSystemCaches();
711+
{
712+
static int recursion_depth = 0;
713+
714+
/* Maximum depth is arbitrary depending on your threshold of pain */
715+
if (recursion_depth < 3)
716+
{
717+
recursion_depth++;
718+
InvalidateSystemCaches();
719+
recursion_depth--;
720+
}
721+
}
712722
#endif
713723
}
714724

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/90fd3bfd17070d3c2467a45204ede17b70a15387

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy