From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Reini Urban <rurban(at)x-ray(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: rmtree() failure on Windows |
Date: | 2004-10-27 15:23:00 |
Message-ID: | 20451.1098890580@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Before I tried anything like that I tried one more thing. I disabled the
> background writer and the problem stopped. So now we know the "culprit".
Okay. So what that says is that win32_open's claim to allow unlinking
an open file is a lie; or at least, it does not work the way the
equivalent facility on Unix does. It sounds to me like Windows is
simply marking the open file as to be deleted on last close --- the
directory entry remains present and so the directory can't be dropped
either.
One relatively low-impact workaround would be to force a checkpoint
(on Windows only) during DROP DATABASE, just before we actually fire
the rmtree() operation. The bgwriter is already coded to close all its
open files after a checkpoint ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2004-10-27 15:42:32 | Re: rmtree() failure on Windows |
Previous Message | Zeugswetter Andreas DAZ SD | 2004-10-27 15:22:37 | Re: rmtree() failure on Windows |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2004-10-27 15:42:32 | Re: rmtree() failure on Windows |
Previous Message | Bruce Momjian | 2004-10-27 15:16:53 | Re: rmtree() failure on Windows |