Re: Re: Too many open files (was Re: spinlock problems reported earlier)

From: Brook Milligan <brook(at)biology(dot)nmsu(dot)edu>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: scrappy(at)hub(dot)org, freebsd-hackers(at)freebsd(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Re: Too many open files (was Re: spinlock problems reported earlier)
Date: 2000-08-28 15:24:00
Message-ID: 200008281524.JAA08118@biology.nmsu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The Hermit Hacker <scrappy(at)hub(dot)org> writes:
> Okay, I just checked out Solaris 8/x86, and it confirms what HP/ux thinks:
> _SC_OPEN_MAX OPEN_MAX Max open files per
> process
> I'm curious as to whether FreeBSD is the only one that doesn't follow this
> "convention"?

From part of the NetBSD manpage for sysconf(3):

DESCRIPTION
This interface is defined by IEEE Std1003.1-1988 (``POSIX''). A far more
complete interface is available using sysctl(3).

_SC_OPEN_MAX
The maximum number of open files per user id.

_SC_STREAM_MAX
The minimum maximum number of streams that a process may have
open at any one time.

BUGS
The value for _SC_STREAM_MAX is a minimum maximum, and required to be the
same as ANSI C's FOPEN_MAX, so the returned value is a ridiculously small
and misleading number.

STANDARDS
The sysconf() function conforms to IEEE Std1003.1-1990 (``POSIX'').

HISTORY
The sysconf function first appeared in 4.4BSD.

This suggests that _SC_STREAM_MAX might be a better value to use. On
one of my NetBSD boxes I have the following:

_SC_OPEN_MAX: 64
_SC_STREAM_MAX: 20

In any case, if this really follows the POSIX standard, perhaps
PostgreSQL code should assume these semantics and work around other
cases that don't follow the standard (instead of work around the POSIX
cases).

Cheers,
Brook

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brook Milligan 2000-08-28 15:26:13 Re: when does CREATE VIEW not create a view?
Previous Message Ross J. Reedstrom 2000-08-28 15:21:16 Re: when does CREATE VIEW not create a view?