Re: BUG #2712: could not fsync segment: Permission - Mailing list pgsql-bugs

From Thomas H.
Subject Re: BUG #2712: could not fsync segment: Permission
Date
Msg-id 03fd01c6f6f2$568c1f60$0201a8c0@iwing
Whole thread Raw
In response to BUG #2712: could not fsync segment: Permission denied  ("Thomas H" <me@alternize.com>)
List pgsql-bugs
> 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2712: could not fsync segment: Permission
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #2701: PQserverVersion function missing