Remove configure probe and related tests for getrlimit.

Thomas Munro <tmunro@postgresql.org>

Commit: bdb657edd6db1e471437d62f4642674a801ef32c
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2022-08-04T21:18:34Z
Releases: 16.0
Remove configure probe and related tests for getrlimit.

getrlimit() is in SUSv2 and all targeted systems have it.

Windows doesn't have it.  We could just use #ifndef WIN32, but for a
little more explanation about why we're making things conditional, let's
retain the HAVE_GETRLIMIT macro.  It's defined in port.h for Unix systems.

On systems that have it, it's not necessary to test for RLIMIT_CORE,
RLIMIT_STACK or RLIMIT_NOFILE macros, since SUSv2 requires those and all
targeted systems have them.  Also remove references to a pre-historic
alternative spelling of RLIMIT_NOFILE, and coding that seemed to believe
that Cygwin didn't have it.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com

Files

PathChange+/−
configure modified +1 −1
configure.ac modified +0 −1
src/backend/storage/file/fd.c modified +0 −4
src/backend/tcop/postgres.c modified +2 −6
src/bin/pgbench/pgbench.c modified +0 −4
src/bin/pg_ctl/pg_ctl.c modified +4 −4
src/include/pg_config.h.in modified +0 −3
src/include/port.h modified +8 −0
src/test/regress/pg_regress.c modified +2 −2
src/tools/msvc/Solution.pm modified +0 −1

Discussion