Re: EINTR error in SunOS

From: Doug Royer <Doug(at)Royer(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: EINTR error in SunOS
Date: 2006-01-02 15:55:47
Message-ID: 43B94D03.2030206@Royer.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Doug McNaught wrote:

> c) treat EINTR as an I/O error (I don't know how easy this would be)

So then at this point - it is detected, so problem solved?

If a LOCAL hard drive fails to reply, you hang. Same with hard,intr
NFS file system.

bytesRead = read(fd, buffer, requestedBytes);

if (bytesRead < 0) {
switch (errno) {

case EAGAIN:
#ifdef USING_RECORD_LOCKING_OR_NON_BLOCKING_IO
...do the above read() again...
#else
/*FALLTHRU*/
#endif
default:
... log error and errno...
break;
}

} else if (bytesRead == 0) {
...AT EOF...

} else if (bytesRead < requestdBytes) {
...if you care, loop on read until
remaining bytes are fetched
or at EOF...
}

return(bytesRead);

> d) say "if you mount 'soft' and lose data, tough luck for you"

I seem to recall from my days at Sun, you should NOT use soft
mount for NFS writes at all. Soft mounts are for non-critical
disk resources. (Solaris admin manual?)

--

Doug Royer | http://INET-Consulting.com
-------------------------------|-----------------------------

We Do Standards - You Need Standards

Attachment Content-Type Size
Doug.vcf text/x-vcard 332 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-01-02 16:49:23 Re: [PATCHES] default resource limits
Previous Message Andreas Seltenreich 2006-01-02 09:33:31 Re: psql & readline & win32