aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2020-04-25 14:17:02 -0700
committerPeter Geoghegan <pg@bowt.ie>2020-04-25 14:17:02 -0700
commitfa7ff642c22ceccad869af5add00c2661d4d091e (patch)
treea797b4c7b0818c64c5e1143f6e222beaf2c74fa7 /src/backend/access/transam/xlog.c
parentf246ea3b2a5e0b75e44f0f18157c4b5e10b5547f (diff)
downloadpostgresql-fa7ff642c22ceccad869af5add00c2661d4d091e.tar.gz
postgresql-fa7ff642c22ceccad869af5add00c2661d4d091e.zip
Fix minor nbtree page deletion buffer lock issue.
Avoid accessing the deletion target page's special area during nbtree page deletion at a point where there is no buffer lock held. This issue was detected by a patch that extends Valgrind's memcheck tool to mark nbtree pages that are unsafe to access (due to not having a buffer lock or buffer pin) as NOACCESS. We do hold a buffer pin at this point, and only access the special area, so the old approach was safe. Even still, it seems like a good idea to tighten up the rules in this area. There is no reason to not simply insist on always holding a buffer lock (not just a pin) when accessing nbtree pages. Update some related comments in passing. Discussion: https://postgr.es/m/CAH2-WzkLgyN3zBvRZ1pkNJThC=xi_0gpWRUb_45eexLH1+k2_Q@mail.gmail.com
Diffstat (limited to 'src/backend/access/transam/xlog.c')
0 files changed, 0 insertions, 0 deletions