aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_utilcmd.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-03-22 13:00:24 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-03-22 13:00:48 -0400
commit1192ba8b67df1446973c71aafde5f6f613dce0af (patch)
treec5b0fbfa7b43cf1f4ed47b8ef3235b2eb24b378e /src/backend/parser/parse_utilcmd.c
parent6e8e7cc580665ddd43c8ca2acc6d60f345570a57 (diff)
downloadpostgresql-1192ba8b67df1446973c71aafde5f6f613dce0af.tar.gz
postgresql-1192ba8b67df1446973c71aafde5f6f613dce0af.zip
Avoid potential deadlock in InitCatCachePhase2().
Opening a catcache's index could require reading from that cache's own catalog, which of course would acquire AccessShareLock on the catalog. So the original coding here risks locking index before heap, which could deadlock against another backend trying to get exclusive locks in the normal order. Because InitCatCachePhase2 is only called when a backend has to start up without a relcache init file, the deadlock was seldom seen in the field. (And by the same token, there's no need to worry about any performance disadvantage; so not much point in trying to distinguish exactly which catalogs have the risk.) Bug report, diagnosis, and patch by Nikhil Sontakke. Additional commentary by me. Back-patch to all supported branches.
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
0 files changed, 0 insertions, 0 deletions