aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/spgist/spginsert.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-09-30 11:29:09 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-09-30 12:53:56 +0300
commitf609d074385e87688c93966e57e9229a889d5f95 (patch)
tree9311db97712aa1b5508de099412580bf1259a1fb /src/backend/access/spgist/spginsert.c
parent311be2aa054725ded78040c63459480c755bef11 (diff)
downloadpostgresql-f609d074385e87688c93966e57e9229a889d5f95.tar.gz
postgresql-f609d074385e87688c93966e57e9229a889d5f95.zip
Fix snapshot leak if lo_open called on non-existent object.
lo_open registers the currently active snapshot, and checks if the large object exists after that. Normally, snapshots registered by lo_open are unregistered at end of transaction when the lo descriptor is closed, but if we error out before the lo descriptor is added to the list of open descriptors, it is leaked. Fix by moving the snapshot registration to after checking if the large object exists. Reported by Pavel Stehule. Backpatch to 8.4. The snapshot registration system was introduced in 8.4, so prior versions are not affected (and not supported, anyway).
Diffstat (limited to 'src/backend/access/spgist/spginsert.c')
0 files changed, 0 insertions, 0 deletions