Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3e51868

Browse files
committed
This patch is because Hurd does not support NOFILE. It is against current
cvs. The Debian bug report says, "The upstream source makes use of NOFILE unconditionalized. As the Hurd doesn't have an arbitrary limit on the number of open files, this is not defined. But _SC_OPEN_MAX works fine and returns 1024 (applications can increase this as they want), so I suggest the below diff. Please forward this upstream, too." Oliver Elphick
1 parent e9ea125 commit 3e51868

File tree

1 file changed

+6
-1
lines changed
  • src/backend/storage/file

1 file changed

+6
-1
lines changed

src/backend/storage/file/fd.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.82 2001/06/18 16:13:21 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.83 2001/08/04 19:42:34 momjian Exp $
1111
*
1212
* NOTES:
1313
*
@@ -290,8 +290,13 @@ pg_nofile(void)
290290
no_files = sysconf(_SC_OPEN_MAX);
291291
if (no_files == -1)
292292
{
293+
/* tweak for Hurd, which does not support NOFILE */
294+
#ifdef NOFILE
293295
elog(DEBUG, "pg_nofile: Unable to get _SC_OPEN_MAX using sysconf(); using %d", NOFILE);
294296
no_files = (long) NOFILE;
297+
#else
298+
elog(FATAL, "pg_nofile: Unable to get _SC_OPEN_MAX using sysconf() and NOFILE is undefined");
299+
#endif
295300
}
296301
#endif
297302

0 commit comments

Comments
 (0)