Re: [HACKERS] [GENERAL] Removing pgsql_tmp files

2010-11-08 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from Tom Lane's message of lun nov 08 22:29:28 -0300 2010: >> I think we need to re-order the operations there to ensure that the >> unlink will still happen if the ereport gets interrupted. > Would it work to put the removal inside a PG_CATCH block? Well, that

Re: [HACKERS] [GENERAL] Removing pgsql_tmp files

2010-11-08 Thread Alvaro Herrera
Excerpts from Tom Lane's message of lun nov 08 22:29:28 -0300 2010: > Hmm. If you look at FileClose() in fd.c, you'll discover that that > "temporary file" log message is emitted immediately before unlink'ing > the file. It looks pretty safe ... but, scratching around, I notice > that there's a

Re: [HACKERS] [GENERAL] Removing pgsql_tmp files

2010-11-08 Thread Tom Lane
Michael Glaesemann writes: > On Nov 8, 2010, at 16:03 , Tom Lane wrote: >> That's very peculiar. Do you keep query logs? It would be useful to >> try to correlate the temp files' PIDs and timestamps with the specific >> queries that must have created them. > We don't log all of them, but I chec