Re: BUG #2712: could not fsync segment: Permission

From: "Thomas H(dot)" <me(at)alternize(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Peter Brant" <Peter(dot)Brant(at)wicourts(dot)gov>, <pgsql-bugs(at)postgresql(dot)org>, "Magnus Hagander" <mha(at)sollentuna(dot)net>
Subject: Re: BUG #2712: could not fsync segment: Permission
Date: 2006-10-23 22:26:50
Message-ID: 03fd01c6f6f2$568c1f60$0201a8c0@iwing
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

> The log messages you have don't make it clear which process is trying to
> do the fsync, but I would expect it to be the bgwriter. (Possibly you
> should modify log_line_prefix to include PID so we can tell a bit
> better.)

you're right (as always :-)). its the "writer process" (pid 5196) that
outputs the error messages:

2006-10-24 00:09:09 [5196] ERROR: XX000: storage sync failed on magnetic
disk: Permission denied
2006-10-24 00:09:09 [5196] LOCATION: smgrsync, smgr.c:888
2006-10-24 00:09:10 [5196] LOG: 42501: could not fsync segment 0 of
relation 1663/3964774/6422947: Permission denied
2006-10-24 00:09:10 [5196] LOCATION: mdsync, md.c:785

and in this case, its process 5988 that keeps the file handle open (its
entry in pg_class is already deleted):

\BaseNamedObjects\pgident: postgres: db_outnow outnow1 127.0.0.1(2362) idle
D:\DB\PostgreSQL-8.2\data\base\3964774\6422947 (1 references, 1 handle)

... while pid 5196 constantly tries to open the file (for over 15min in this
case), until...

00:22:18 postgres.exe:5196 OPEN
D:\DB\PostgreSQL-8.2\data\base\3964774\6422947 DELETE PEND Options: Open
Access: 0012019F
00:22:19 postgres.exe:5196 OPEN
D:\DB\PostgreSQL-8.2\data\base\3964774\6422947 DELETE PEND Options: Open
Access: 0012019F
00:22:20 postgres.exe:5988 CLOSE
D:\DB\PostgreSQL-8.2\data\base\3964774\6422947 SUCCESS
00:22:20 postgres.exe:5196 OPEN
D:\DB\PostgreSQL-8.2\data\base\3964774\6422947 NOT FOUND Options: Open
Access: 0012019F

is that of any use? what more logging options would be interesting?

- thomas

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Davis 2006-10-24 02:03:07 Bug related to out of memory condition
Previous Message Tom Lane 2006-10-23 22:00:22 Re: BUG #2712: could not fsync segment: Permission

Browse pgsql-patches by date

  From Date Subject
Next Message Matthew O'Connor 2006-10-23 22:39:23 Re: [PATCHES] smartvacuum() instead of autovacuum
Previous Message Tom Lane 2006-10-23 22:00:22 Re: BUG #2712: could not fsync segment: Permission