Re: [HACKERS] buffile.c resource owner breakage on segment extension

2013-11-04 Thread Andres Freund
On 2013-11-01 15:28:54 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: While not particularly nice, given the API, it seems best for buffile.c to remember the resource owner used for the original segment and temporarily set that during the extension. Hm, yeah, that

[HACKERS] buffile.c resource owner breakage on segment extension

2013-11-01 Thread Andres Freund
Hi, The attached testcase demonstrates that it currently is possible that buffile.c segments get created belonging to the wrong resource owner leading to WARNINGs ala temporary file leak: File %d still referenced, ERRORs like write failed, asserts and segfaults. The problem is that while

Re: [HACKERS] buffile.c resource owner breakage on segment extension

2013-11-01 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: While not particularly nice, given the API, it seems best for buffile.c to remember the resource owner used for the original segment and temporarily set that during the extension. Hm, yeah, that seems right. It's just like repalloc keeping the