Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

In response to

Responses

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group