aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeMergejoin.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2012-04-23 22:08:06 -0400
committerRobert Haas <rhaas@postgresql.org>2012-04-23 22:08:06 -0400
commit7ab9b2f3b79177e501a1ef90ed004cc68788abaf (patch)
tree33af4d31fccb14ad43b0f9613fb6d356e4bc7257 /src/backend/executor/nodeMergejoin.c
parent85efd5f06593b80bbe01e541d78b336c1077213e (diff)
downloadpostgresql-7ab9b2f3b79177e501a1ef90ed004cc68788abaf.tar.gz
postgresql-7ab9b2f3b79177e501a1ef90ed004cc68788abaf.zip
Rearrange lazy_scan_heap to avoid visibility map race conditions.
We must set the visibility map bit before releasing our exclusive lock on the heap page; otherwise, someone might clear the heap page bit before we set the visibility map bit, leading to a situation where the visibility map thinks the page is all-visible but it's really not. This problem has existed since 8.4, but it wasn't critical before we had index-only scans, since the worst case scenario was that the page wouldn't get vacuumed until the next scan_all vacuum. Along the way, a couple of minor, related improvements: (1) if we pause the heap scan to do an index vac cycle, release any visibility map page we're holding, since really long-running pins are not good for a variety of reasons; and (2) warn if we see a page that's marked all-visible in the visibility map but not on the page level, since that should never happen any more (it was allowed in previous releases, but not in 9.2).
Diffstat (limited to 'src/backend/executor/nodeMergejoin.c')
0 files changed, 0 insertions, 0 deletions