summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistbuild.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2023-04-01 17:50:18 -0700
committerAndres Freund <andres@anarazel.de>2023-04-01 17:50:18 -0700
commit14f98e0af996beff561f66d7436c6da5d2de524d (patch)
tree7c045620fb526012f578bd55d59ff88e29253c55 /src/backend/access/gist/gistbuild.c
parent0070b66fef21e909adb283f7faa7b1978836ad75 (diff)
downloadpostgresql-14f98e0af996beff561f66d7436c6da5d2de524d.tar.gz
hio: Release extension lock before initializing page / pinning VM
PageInit() while holding the extension lock is unnecessary after 0d1fe9f74e3 started to use RBM_ZERO_AND_LOCK - nobody can look at the new page before we release the page lock. PageInit() zeroes the page, which isn't that cheap, so deferring it until after the extension lock is released seems like a good idea. Doing visibilitymap_pin() while holding the extension lock, introduced in 7db0cd2145f2, looks like an accident. Due to the restrictions on HEAP_INSERT_FROZEN it's unlikely to be a performance issue, but it still seems better to move it out. We also are doing the visibilitymap_pin() while holding the buffer lock, which will be fixed in a separate commit. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: http://postgr.es/m/419312fd-9255-078c-c3e3-f0525f911d7f@iki.fi
Diffstat (limited to 'src/backend/access/gist/gistbuild.c')
0 files changed, 0 insertions, 0 deletions