Thread: My main/base/pgsql_tmp directory has over 5.7 millions files

My main/base/pgsql_tmp directory has over 5.7 millions files

From
Francois Lacoursiere
Date:
Is there any reason why these files aren't cleaned-up ?  We have just installed postgresql-9.1.3 and it seems we have this problem since this update.
I haven't checked the ratio (ls takes more than 5 minutes to return) but most of these files seems to be empty.  It causes me problem when I try to tar/untar my data directory to have SR on a slave machine.

Would it be safe to have a cron script cleaining up these files once a day ?  Better yet, any idea why those files are not automatically deleted when they are no longer needed ?

Francois L.
Montreal, Canada

Re: My main/base/pgsql_tmp directory has over 5.7 millions files

From
Tom Lane
Date:
Francois Lacoursiere <lacouf@gmail.com> writes:
> Is there any reason why these files aren't cleaned-up ?  We have just
> installed postgresql-9.1.3 and it seems we have this problem since this
> update.

They're certainly supposed to be cleaned up.  Can you provide a test
case that causes one to be created and not cleaned up?

            regards, tom lane