"sts" variable used in pool_fetch_memory_cache() did not have volatile
modifier although it is used in PG_TRY() block. If an exception arises
the value set to variable will be lost in the PG_CATCH block. The bad
effect of this will not be triggered unless error occurs and I think
the bad effect has rarely been observed in the wild (as for as I know,
I have never heard such a report). Anyway, bug is bug.
{
char *qcache;
size_t qcachelen;
- int sts;
+ volatile int sts;
pool_sigset_t oldmask;
ereport(DEBUG1,