aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/variable.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:55:57 +0300
commitcd6c03b5c15e2b8bf306d97ed9befaf83ace5f93 (patch)
tree4c74b6e5f37de7f9851cd9e6dbeda04d560ae896 /src/backend/commands/variable.c
parent03b6a6b48e932c4123bee4f6b2a71944da5bd05c (diff)
downloadpostgresql-cd6c03b5c15e2b8bf306d97ed9befaf83ace5f93.tar.gz
postgresql-cd6c03b5c15e2b8bf306d97ed9befaf83ace5f93.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/commands/variable.c')
0 files changed, 0 insertions, 0 deletions