Re: BUG #5038: WAL file is pending deletion in pg_xlog folder, this interferes with WAL archiving.

From: Luke Koops <luke(dot)koops(at)entrust(dot)com>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5038: WAL file is pending deletion in pg_xlog folder, this interferes with WAL archiving.
Date: 2009-09-07 20:29:45
Message-ID: A3144629B5AC714A8BF27806EBFA7057514623A2@sottexch7.corp.ad.entrust.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Monday, September 07, 2009 1:17 PM
> To: Heikki Linnakangas
> Cc: Luke Koops; pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] BUG #5038: WAL file is pending deletion
> in pg_xlog folder, this interferes with WAL archiving.
>
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)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 processes get a directory listing, the file will no longer be listed. On Windows, the file name continues to show up in directory listings. The file is in a state called pending deletion. Windows documentation doesn't give a specific test for this state. Perhaps you could use _access().
====================
>From http://support.microsoft.com/kb/159199

This file is in a state known as pending deletion. This file has been deleted, but there are still handles open to it. NTFS will wait until all handles 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 is 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 manipulate the file. You are not able to view the permissions, the owner, or the contents of the file. The file does, however, show up in a DIR listing in 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.
====================
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomasz Karlik 2009-09-08 05:48:09 Odp: Re: Re: BUG #5035: cast 'text' to 'name' doesnt work in plpgsqlfunction
Previous Message Tom Lane 2009-09-07 17:17:18 Re: BUG #5038: WAL file is pending deletion in pg_xlog folder, this interferes with WAL archiving.