Re: [HACKERS] mdtruncate leaking fd.c handles?

2016-09-08 Thread Andres Freund
On 2016-09-08 15:50:42 -0700, Andres Freund wrote: > > Andres Freund writes: > > > Am I missing something or is md.c:mdtruncate() leaking open files? > Will fix. And done. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] mdtruncate leaking fd.c handles?

2016-09-08 Thread Andres Freund
On 2016-09-08 18:39:56 -0400, Tom Lane wrote: > Andres Freund writes: > > Am I missing something or is md.c:mdtruncate() leaking open files? > > Yeah, I think you're right. > > > This only really matters for VACUUM truncate and ON COMMIT TRUNCATE temp > > table truncation

Re: [HACKERS] mdtruncate leaking fd.c handles?

2016-09-08 Thread Tom Lane
Andres Freund writes: > Am I missing something or is md.c:mdtruncate() leaking open files? Yeah, I think you're right. > This only really matters for VACUUM truncate and ON COMMIT TRUNCATE temp > table truncation afaics. Also, you'd need a table > 1GB to leak anything at

[HACKERS] mdtruncate leaking fd.c handles?

2016-09-08 Thread Andres Freund
Hi, Am I missing something or is md.c:mdtruncate() leaking open files? The relevant piece of code is: if (priorblocks > nblocks) { /* * This segment is no longer active (and has already been unlinked