Re: Disaster! - Mailing list pgsql-hackers

From Jeroen Ruigrok/asmodai
Subject Re: Disaster!
Date
Msg-id 20040130055932.GZ39523@nexus.ninth-circle.org
Whole thread Raw
In response to Re: Disaster!  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
-On [20040125 03:52], Tom Lane (tgl@sss.pgh.pa.us) wrote:
>Hm, okay, I'm pretty sure that that combination wouldn't report ENOSPC
>at close().

From Tru64's write(2):

[ENOSPC]     [XSH4.2]  No free space is left on the file system containing the     file.     [Tru64 UNIX]  An attempt
wasmade to write past the "early     warning" EOT while this indicator was enabled.     [Tru64 UNIX]  An attempt was
madeto write at or beyond the end of     a partition.
 

From close(2):

[Tru64 UNIX]   A close() function on an NFS file system waits for all
outstanding I/O to complete. If any operation completes with an error,
the error will be returned by close(). The possible errors depend on the
NFS server implementation, but the most likely errors are:

[snip...]
[ENOSPC] Attempted to write on a full file system.

>We need to fix the code to check close's return value, probably, but it
>seems we still lack a clear explanation of what happened to your
>database.

You always need to check the return codes of calls like that, what if
you received EBADF or EINTR for whatever reason?

-- 
Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / kita no mono
PGP fingerprint: 2D92 980E 45FE 2C28 9DB7  9D88 97E6 839B 2EAC 625B
http://www.tendra.org/   | http://diary.in-nomine.org/
From the pine tree, learn of the pine tree.  And from the bamboo, of the
bamboo...


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Stupid question on Read Committed Isolation Level
Next
From: Greg Stark
Date:
Subject: Re: Question about indexes