Re: BUG #5038: WAL file is pending deletion in pg_xlog folder, this interferes with WAL archiving. - Mailing list pgsql-bugs

From Luke Koops
Subject Re: BUG #5038: WAL file is pending deletion in pg_xlog folder, this interferes with WAL archiving.
Date
Msg-id A3144629B5AC714A8BF27806EBFA7057514623A2@sottexch7.corp.ad.entrust.com
Whole thread Raw
In response to Re: BUG #5038: WAL file is pending deletion in pg_xlog folder, this interferes with WAL archiving.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5038: WAL file is pending deletion in pg_xlog folder, this interferes with WAL archiving.  (Luke Koops <luke.koops@entrust.com>)
List pgsql-bugs
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Monday, September 07, 2009 1:17 PM
> To: Heikki Linnakangas
> Cc: Luke Koops; pgsql-bugs@postgresql.org
> Subject: Re: [BUGS] BUG #5038: WAL file is pending deletion
> in pg_xlog folder, this interferes with WAL archiving.
>
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> > Perhaps we should try to close the old WAL file sooner.
>
> There is zero hope of making that work.  What we probably
> need to do is fix the code that scans pg_xlog so that it
> ignores files that are pending deletion.  (I assume there's
> some way to find that out on
> Windows.)
On *nux systems, unlink removes the link from the directory.  When other pr=
ocesses get a directory listing, the file will no longer be listed.  On Win=
dows, the file name continues to show up in directory listings.  The file i=
s in a state called pending deletion.  Windows documentation doesn't give a=
 specific test for this state.  Perhaps you could use _access().
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=46rom http://support.microsoft.com/kb/159199

This file is in a state known as pending deletion. This file has been delet=
ed, but there are still handles open to it. NTFS will wait until all handle=
s to this file are closed before updating the index. If an attempt is made =
to access the file, however, NTFS will deny the attempt. Because the file i=
s listed in the index, but is effectively deleted, you can see the file but=
 you cannot access it.

Windows NT returns an "Access Denied" error message when you attempt to man=
ipulate the file. You are not able to view the permissions, the owner, or t=
he contents of the file. The file does, however, show up in a DIR listing i=
n File Manager and in Explorer. This occurs even though the user trying to =
access the file has permissions to the file. Even an administrator will be =
unable to take ownership of this file.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
>                       regards, tom lane
>

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5038: WAL file is pending deletion in pg_xlog folder, this interferes with WAL archiving.
Next
From: "Tomasz Karlik"
Date:
Subject: Odp: Re: Re: BUG #5035: cast 'text' to 'name' doesnt work in plpgsqlfunction