Re: "Permission denied" failures occurring on Windows

Lists: pgsql-bugs
From: "Zubkovsky, Sergey" <Sergey(dot)Zubkovsky(at)transas(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: "Permission denied" failures occurring on Windows
Date: 2007-03-27 06:41:25
Message-ID: 528853D3C5ED2C4AA8990B504BA7FB850106DD90@sol.transas.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hello.

In spite of the fact that as it was outlined in the "change log" to PostgreSQL 8.2.2, the bug of the periodical "permission denied" error occurrence was fixed:

  "Fix bogus "permission denied" failures occurring on Windows due to attempts to fsync already-deleted files (Magnus, Tom)"

I still can observe such erroneous behavior in the latest release of PostgreSQL:

  select version();

  "PostgreSQL 8.2.3 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)"

 

Typical error message is the following:

  2007-03-16 22:21:08 ERROR:  could not open relation 16405/16406/2609: Permission denied

It seems that it occurs when DDL operator is performed.

This error occurs irrespective of option "fsync" value, though it seems that if "fsync=off" than the frequency error occurrence is less a little bit comparing to "fsync=on" case.

 

All other parameters in file postgresql.conf were not changed.

I have made a "clean" install of the latest release of PostgreSQL.

OS: Windows XP Pro SP2

 

As I can suppose, the problem which was discussed in the "[HACKERS] Idea for fixing the Windows fsync problem" has not been fixed yet.

Here are some typical error messages in files pg_log/*:

-------------------------------------------------------------------------------------------------------------

2007-03-19 18:57:22 LOG:  could not open temporary statistics file

"global/pgstat.tmp": Permission denied

2007-03-19 18:58:28 NOTICE:  Table does not exist:

part_MsgRoot_(2000-01-01 01:00)

2007-03-19 18:58:28 CONTEXT:  SQL statement "SELECT "andbDoPrepareView_sp"(  $1 ,  $2 ,  $3  )"

 

-------------------------------------------------------------------------------------------------------------

2007-03-19 19:08:39 ERROR:  could not open relation 16405/16406/21745:

Permission denied

2007-03-19 19:08:39 CONTEXT:  SQL statement "

    CREATE UNIQUE  INDEX "part_MsgPos2_(2007-01-01 02:00)_UTC_UID" ON

"part_MsgPos2_(2007-01-01 02:00)"

    (

        "UTC",

        "UID"

    );

    "

    PL/pgSQL function "andbCreatePartitionsForGroup_sp" line 32 at execute statement

 

-------------------------------------------------------------------------------------------------------------

2007-03-19 19:25:54 ERROR:  could not open relation 16405/16406/22479:

Permission denied

2007-03-19 19:25:54 CONTEXT:  SQL statement "ALTER TABLE

"part_MsgRoot_(2007-01-01 03:00)" ADD CHECK( "UTC" >= '2007-01-01 03:00:00' and "UTC" < '2007-01-01 04:00:00' )"

 

-------------------------------------------------------------------------------------------------------------

2007-03-19 19:25:56 ERROR:  could not open relation 16405/16406/22603:

Permission denied

2007-03-19 19:25:56 CONTEXT:  SQL statement "

    CREATE UNIQUE  INDEX "part_MsgOther2_(2007-01-01 03:00)_UTC_UID" ON

"part_MsgOther2_(2007-01-01 03:00)"

    (

        "UTC",

        "UID"

    );

    "

    PL/pgSQL function "andbCreatePartitionsForGroup_sp" line 32 at execute statement

 

-------------------------------------------------------------------------------------------------------------

2007-03-20 17:21:46 ERROR:  could not open relation 16405/16406/26881:

Permission denied

2007-03-20 17:21:46 CONTEXT:  SQL statement "ALTER TABLE "Billing" ADD CHECK( "UTC" IS NULL )"

    PL/pgSQL function "andbRegisterPartitionedTable_sp" line 6 at execute statement

 

-------------------------------------------------------------------------------------------------------------

Regards

Sergey Zubkovsky


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: "Zubkovsky, Sergey" <Sergey(dot)Zubkovsky(at)transas(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: "Permission denied" failures occurring on Windows
Date: 2007-03-27 21:23:31
Message-ID: 46098B53.2080304@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Zubkovsky, Sergey wrote:
> Hello.
>
>
>
> In spite of the fact that as it was outlined in the "change log" to
> PostgreSQL 8.2.2, the bug of the periodical "permission denied" error
> occurrence was fixed:
>
>
>
> “Fix bogus "permission denied" failures occurring on Windows due to
> attempts to fsync already-deleted files (Magnus, Tom)”
>
>
>
> I still can observe such erroneous behavior in the latest release of
> PostgreSQL:
>
>
>
> select version();
>
> "PostgreSQL 8.2.3 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
> 3.4.2 (mingw-special)"
>
>
>
> Typical error message is the following:
>
> 2007-03-16 22:21:08 ERROR: could not open relation 16405/16406/2609:
> Permission denied
>

The obvious question before we even think about anything else - any
antivirus, antispyware or any other third party software on the machine
that may be using a filter driver?

//Magnus


From: Dave Page <dpage(at)postgresql(dot)org>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: "Zubkovsky, Sergey" <Sergey(dot)Zubkovsky(at)transas(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: "Permission denied" failures occurring on Windows
Date: 2007-03-28 07:36:15
Message-ID: 460A1AEF.9090701@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Magnus Hagander wrote:
>
> The obvious question before we even think about anything else - any
> antivirus, antispyware or any other third party software on the machine
> that may be using a filter driver?

Any idea how easy would it be to log the installed filter drivers at
startup? If we can gather more info over the long term we could get a
better idea of what products have iffy drivers.

Regards Dave


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Dave Page <dpage(at)postgresql(dot)org>
Cc: "Zubkovsky, Sergey" <Sergey(dot)Zubkovsky(at)transas(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: "Permission denied" failures occurring on Windows
Date: 2007-03-28 08:33:02
Message-ID: 20070328083302.GC11810@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Wed, Mar 28, 2007 at 08:36:15AM +0100, Dave Page wrote:
> Magnus Hagander wrote:
> >
> > The obvious question before we even think about anything else - any
> > antivirus, antispyware or any other third party software on the machine
> > that may be using a filter driver?
>
> Any idea how easy would it be to log the installed filter drivers at
> startup? If we can gather more info over the long term we could get a
> better idea of what products have iffy drivers.

Seems not to be entirely easy. There are functions to do it in the DDK
(IoEnumerateRegisteredFiltersList() and FltEnumerateFilters()), but those
are kernel level functions.

Check this thread, for example:
http://groups.google.se/group/microsoft.public.development.device.drivers/browse_frm/thread/9affce7b16730526/7b8ab594d408da8e?lnk=st&q=enumerate+filter+drivers&rnum=2&hl=en#7b8ab594d408da8e

IRIC they should be in the registry under CurrentControlSet, but I'm unsure
if you can actually find out which are filter drivers from there.

//Magnus


From: "Zubkovsky, Sergey" <Sergey(dot)Zubkovsky(at)transas(dot)com>
To: "Dave Page" <dpage(at)postgresql(dot)org>
Cc: "Magnus Hagander" <magnus(at)hagander(dot)net>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: "Permission denied" failures occurring on Windows
Date: 2007-03-30 15:47:58
Message-ID: 528853D3C5ED2C4AA8990B504BA7FB850106DD97@sol.transas.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


It was Kaspersky antivirus with its on-fly "*:KAVICHS" NTFS-streams.

Thanks.

-----Original Message-----
From: Dave Page [mailto:dpage(at)postgresql(dot)org]
Sent: Wednesday, March 28, 2007 11:36 AM
To: Magnus Hagander
Cc: Zubkovsky, Sergey; pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] "Permission denied" failures occurring on Windows

Magnus Hagander wrote:
>
> The obvious question before we even think about anything else - any
> antivirus, antispyware or any other third party software on the
machine
> that may be using a filter driver?

Any idea how easy would it be to log the installed filter drivers at
startup? If we can gather more info over the long term we could get a
better idea of what products have iffy drivers.

Regards Dave