]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Ensure all files created for a single BufFile have the same resource owner.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 1 Nov 2013 20:10:03 +0000 (16:10 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 1 Nov 2013 20:10:03 +0000 (16:10 -0400)
commit0c8462fd5325170fda533ecd59e6f986dcb3da6e
tree1645cbad12f332d1ea059d7de319c53c5a69c052
parentd81cd0430f486f1f1c22ebd9733114b944af4d0c
Ensure all files created for a single BufFile have the same resource owner.

Callers expect that they only have to set the right resource owner when
creating a BufFile, not during subsequent operations on it.  While we could
insist this be fixed at the caller level, it seems more sensible for the
BufFile to take care of it.  Without this, some temp files belonging to
a BufFile can go away too soon, eg at the end of a subtransaction,
leading to errors or crashes.

Reported and fixed by Andres Freund.  Back-patch to all active branches.
src/backend/storage/file/buffile.c