> 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