pgsql: Ensure all files created for a single BufFile have the same reso

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Ensure all files created for a single BufFile have the same reso
Date: 2013-11-01 20:10:41
Message-ID: [email protected]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/14d4548f1c9ba21d2c1eb26e4169e6fee3b3fd68

Modified Files
--------------
src/backend/storage/file/buffile.c | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-11-02 20:46:38 pgsql: Retry after buffer locking failure during SPGiST index creation.
Previous Message Tom Lane 2013-11-01 17:57:42 pgsql: Remove CTimeZone/HasCTZSet, root and branch.