Skip to content
Snippets Groups Projects
Commit f112d408 authored by Tom Lane's avatar Tom Lane
Browse files

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 f868a814.)
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
parent 95e9f928
Branches
Tags
No related merge requests found
...@@ -619,7 +619,17 @@ AcceptInvalidationMessages(void) ...@@ -619,7 +619,17 @@ AcceptInvalidationMessages(void)
} }
} }
#elif defined(CLOBBER_CACHE_RECURSIVELY) #elif defined(CLOBBER_CACHE_RECURSIVELY)
{
static int recursion_depth = 0;
/* Maximum depth is arbitrary depending on your threshold of pain */
if (recursion_depth < 3)
{
recursion_depth++;
InvalidateSystemCaches(); InvalidateSystemCaches();
recursion_depth--;
}
}
#endif #endif
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment