2020-07-24 10:34:16 +02:00
|
|
|
/* src/include/pg_config.h.in. Generated from configure.ac by autoheader. */
|
2000-07-02 17:21:27 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to the type of arg 1 of 'accept' */
|
|
|
|
#undef ACCEPT_TYPE_ARG1
|
2002-04-21 21:52:18 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to the type of arg 2 of 'accept' */
|
|
|
|
#undef ACCEPT_TYPE_ARG2
|
2000-06-29 07:50:29 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to the type of arg 3 of 'accept' */
|
|
|
|
#undef ACCEPT_TYPE_ARG3
|
2000-06-29 07:50:29 +02:00
|
|
|
|
2003-09-07 05:43:57 +02:00
|
|
|
/* Define to the return type of 'accept' */
|
|
|
|
#undef ACCEPT_TYPE_RETURN
|
|
|
|
|
2009-07-02 20:55:40 +02:00
|
|
|
/* Define if building universal (internal helper macro) */
|
|
|
|
#undef AC_APPLE_UNIVERSAL_BUILD
|
|
|
|
|
2008-02-17 17:36:43 +01:00
|
|
|
/* The normal alignment of `double', in bytes. */
|
2003-04-07 00:45:23 +02:00
|
|
|
#undef ALIGNOF_DOUBLE
|
2000-06-29 07:50:29 +02:00
|
|
|
|
2008-02-17 17:36:43 +01:00
|
|
|
/* The normal alignment of `int', in bytes. */
|
2003-04-07 00:45:23 +02:00
|
|
|
#undef ALIGNOF_INT
|
2000-06-29 07:50:29 +02:00
|
|
|
|
2008-02-17 17:36:43 +01:00
|
|
|
/* The normal alignment of `long', in bytes. */
|
2003-04-07 00:45:23 +02:00
|
|
|
#undef ALIGNOF_LONG
|
2000-06-29 07:50:29 +02:00
|
|
|
|
2008-02-17 17:36:43 +01:00
|
|
|
/* The normal alignment of `long long int', in bytes. */
|
2003-04-07 00:45:23 +02:00
|
|
|
#undef ALIGNOF_LONG_LONG_INT
|
2000-06-29 07:50:29 +02:00
|
|
|
|
2017-11-14 21:03:55 +01:00
|
|
|
/* The normal alignment of `PG_INT128_TYPE', in bytes. */
|
|
|
|
#undef ALIGNOF_PG_INT128_TYPE
|
|
|
|
|
2008-02-17 17:36:43 +01:00
|
|
|
/* The normal alignment of `short', in bytes. */
|
2003-04-07 00:45:23 +02:00
|
|
|
#undef ALIGNOF_SHORT
|
2001-09-06 05:23:38 +02:00
|
|
|
|
2008-05-02 03:08:27 +02:00
|
|
|
/* Size of a disk block --- this also limits the size of a tuple. You can set
|
|
|
|
it bigger if you need bigger tuples (although TOAST should reduce the need
|
|
|
|
to have large tuples, since fields can be spread across multiple tuples).
|
|
|
|
BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ is
|
|
|
|
currently 2^15 (32768). This is determined by the 15-bit widths of the
|
|
|
|
lp_off and lp_len fields in ItemIdData (see include/storage/itemid.h).
|
|
|
|
Changing BLCKSZ requires an initdb. */
|
|
|
|
#undef BLCKSZ
|
|
|
|
|
2020-02-10 17:12:46 +01:00
|
|
|
/* Saved arguments from configure */
|
|
|
|
#undef CONFIGURE_ARGS
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to the default TCP port number on which the server listens and to
|
2003-08-11 20:07:38 +02:00
|
|
|
which clients will try to connect. This can be overridden at run-time, but
|
|
|
|
it's convenient if your clients have the right default compiled in.
|
2003-04-07 00:45:23 +02:00
|
|
|
(--with-pgport=PORTNUM) */
|
2000-06-29 07:50:29 +02:00
|
|
|
#undef DEF_PGPORT
|
|
|
|
|
2003-08-11 20:07:38 +02:00
|
|
|
/* Define to the default TCP port number as a string constant. */
|
2003-04-07 00:45:23 +02:00
|
|
|
#undef DEF_PGPORT_STR
|
1999-02-21 02:41:55 +01:00
|
|
|
|
2007-07-10 18:41:01 +02:00
|
|
|
/* Define to build with GSSAPI support. (--with-gssapi) */
|
|
|
|
#undef ENABLE_GSS
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you want National Language Support. (--enable-nls) */
|
2001-06-02 20:25:18 +02:00
|
|
|
#undef ENABLE_NLS
|
|
|
|
|
2003-11-24 14:16:22 +01:00
|
|
|
/* Define to 1 to build client libraries as thread-safe code.
|
|
|
|
(--enable-thread-safety) */
|
|
|
|
#undef ENABLE_THREAD_SAFETY
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if gettimeofday() takes only 1 argument. */
|
|
|
|
#undef GETTIMEOFDAY_1ARG
|
2001-09-23 00:54:33 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
#ifdef GETTIMEOFDAY_1ARG
|
|
|
|
# define gettimeofday(a,b) gettimeofday(a)
|
2000-08-20 12:55:35 +02:00
|
|
|
#endif
|
|
|
|
|
2009-09-14 00:18:22 +02:00
|
|
|
/* Define to 1 if you have the `append_history' function. */
|
|
|
|
#undef HAVE_APPEND_HISTORY
|
|
|
|
|
2016-09-15 21:29:39 +02:00
|
|
|
/* Define to 1 if you have the `ASN1_STRING_get0_data' function. */
|
|
|
|
#undef HAVE_ASN1_STRING_GET0_DATA
|
|
|
|
|
Add a basic atomic ops API abstracting away platform/architecture details.
Several upcoming performance/scalability improvements require atomic
operations. This new API avoids the need to splatter compiler and
architecture dependent code over all the locations employing atomic
ops.
For several of the potential usages it'd be problematic to maintain
both, a atomics using implementation and one using spinlocks or
similar. In all likelihood one of the implementations would not get
tested regularly under concurrency. To avoid that scenario the new API
provides a automatic fallback of atomic operations to spinlocks. All
properties of atomic operations are maintained. This fallback -
obviously - isn't as fast as just using atomic ops, but it's not bad
either. For one of the future users the atomics ontop spinlocks
implementation was actually slightly faster than the old purely
spinlock using implementation. That's important because it reduces the
fear of regressing older platforms when improving the scalability for
new ones.
The API, loosely modeled after the C11 atomics support, currently
provides 'atomic flags' and 32 bit unsigned integers. If the platform
efficiently supports atomic 64 bit unsigned integers those are also
provided.
To implement atomics support for a platform/architecture/compiler for
a type of atomics 32bit compare and exchange needs to be
implemented. If available and more efficient native support for flags,
32 bit atomic addition, and corresponding 64 bit operations may also
be provided. Additional useful atomic operations are implemented
generically ontop of these.
The implementation for various versions of gcc, msvc and sun studio have
been tested. Additional existing stub implementations for
* Intel icc
* HUPX acc
* IBM xlc
are included but have never been tested. These will likely require
fixes based on buildfarm and user feedback.
As atomic operations also require barriers for some operations the
existing barrier support has been moved into the atomics code.
Author: Andres Freund with contributions from Oskari Saarenmaa
Reviewed-By: Amit Kapila, Robert Haas, Heikki Linnakangas and Álvaro Herrera
Discussion: CA+TgmoYBW+ux5-8Ja=Mcyuy8=VXAnVRHp3Kess6Pn3DMXAPAEA@mail.gmail.com,
20131015123303.GH5300@awork2.anarazel.de,
20131028205522.GI20248@awork2.anarazel.de
2014-09-25 23:49:05 +02:00
|
|
|
/* Define to 1 if you want to use atomics if available. */
|
|
|
|
#undef HAVE_ATOMICS
|
|
|
|
|
|
|
|
/* Define to 1 if you have the <atomic.h> header file. */
|
|
|
|
#undef HAVE_ATOMIC_H
|
|
|
|
|
2019-11-08 19:44:20 +01:00
|
|
|
/* Define to 1 if you have the `backtrace_symbols' function. */
|
|
|
|
#undef HAVE_BACKTRACE_SYMBOLS
|
|
|
|
|
2016-09-15 21:29:39 +02:00
|
|
|
/* Define to 1 if you have the `BIO_meth_new' function. */
|
|
|
|
#undef HAVE_BIO_METH_NEW
|
|
|
|
|
Use clock_gettime(), if available, in instr_time measurements.
The advantage of clock_gettime() is that the API allows the result to
be precise to nanoseconds, not just microseconds as in gettimeofday().
Now that it's routinely possible to do tens of plan node executions
in 1us, we really need more precision than gettimeofday() can offer
for EXPLAIN ANALYZE to accumulate statistics with.
Some research shows that clock_gettime() is available on pretty nearly
every modern Unix-ish platform, and as far as I have been able to test,
it has about the same execution time as gettimeofday(), so there's no
loss in switching over. (By the same token, this doesn't do anything
to fix the fact that we really wish clock readings were faster. But
there's enough win here to justify changing anyway.)
A small side benefit is that on most platforms, we can use CLOCK_MONOTONIC
instead of CLOCK_REALTIME and thereby render EXPLAIN impervious to
concurrent resets of the system clock. (This means that code must not
assume that the contents of struct instr_time have any well-defined
interpretation as timestamps, but really that was true before.)
Some platforms offer nonstandard clock IDs that might be of interest.
This patch knows we should use CLOCK_MONOTONIC_RAW on macOS, because it
provides more precision and is faster to read than their CLOCK_MONOTONIC.
If there turn out to be many more cases where we need special rules, it
might be appropriate to handle the selection of clock ID in configure,
but for the moment that doesn't seem worth the trouble.
Discussion: https://postgr.es/m/31856.1400021891@sss.pgh.pa.us
2017-01-02 19:41:51 +01:00
|
|
|
/* Define to 1 if you have the `clock_gettime' function. */
|
|
|
|
#undef HAVE_CLOCK_GETTIME
|
|
|
|
|
2017-03-20 18:35:21 +01:00
|
|
|
/* Define to 1 if your compiler handles computed gotos. */
|
|
|
|
#undef HAVE_COMPUTED_GOTO
|
|
|
|
|
2018-11-07 18:05:54 +01:00
|
|
|
/* Define to 1 if you have the `copyfile' function. */
|
|
|
|
#undef HAVE_COPYFILE
|
|
|
|
|
2018-11-07 22:41:42 +01:00
|
|
|
/* Define to 1 if you have the <copyfile.h> header file. */
|
|
|
|
#undef HAVE_COPYFILE_H
|
|
|
|
|
2011-12-10 21:35:41 +01:00
|
|
|
/* Define to 1 if you have the <crtdefs.h> header file. */
|
|
|
|
#undef HAVE_CRTDEFS_H
|
|
|
|
|
2016-09-15 21:29:39 +02:00
|
|
|
/* Define to 1 if you have the `CRYPTO_lock' function. */
|
|
|
|
#undef HAVE_CRYPTO_LOCK
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#undef HAVE_DECL_FDATASYNC
|
2000-08-29 11:36:51 +02:00
|
|
|
|
2006-01-18 00:52:31 +01:00
|
|
|
/* Define to 1 if you have the declaration of `F_FULLFSYNC', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#undef HAVE_DECL_F_FULLFSYNC
|
|
|
|
|
2018-07-23 06:13:20 +02:00
|
|
|
/* Define to 1 if you have the declaration of
|
|
|
|
`LLVMCreateGDBRegistrationListener', and to 0 if you don't. */
|
|
|
|
#undef HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER
|
|
|
|
|
|
|
|
/* Define to 1 if you have the declaration of
|
|
|
|
`LLVMCreatePerfJITEventListener', and to 0 if you don't. */
|
|
|
|
#undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER
|
|
|
|
|
2018-08-24 19:20:55 +02:00
|
|
|
/* Define to 1 if you have the declaration of `LLVMGetHostCPUFeatures', and to
|
|
|
|
0 if you don't. */
|
|
|
|
#undef HAVE_DECL_LLVMGETHOSTCPUFEATURES
|
|
|
|
|
2018-03-21 01:26:25 +01:00
|
|
|
/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0
|
|
|
|
if you don't. */
|
|
|
|
#undef HAVE_DECL_LLVMGETHOSTCPUNAME
|
|
|
|
|
|
|
|
/* Define to 1 if you have the declaration of `LLVMOrcGetSymbolAddressIn', and
|
|
|
|
to 0 if you don't. */
|
|
|
|
#undef HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN
|
|
|
|
|
2006-06-18 20:30:21 +02:00
|
|
|
/* Define to 1 if you have the declaration of `posix_fadvise', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#undef HAVE_DECL_POSIX_FADVISE
|
|
|
|
|
2021-07-13 01:17:35 +02:00
|
|
|
/* Define to 1 if you have the declaration of `preadv', and to 0 if you don't.
|
|
|
|
*/
|
|
|
|
#undef HAVE_DECL_PREADV
|
|
|
|
|
|
|
|
/* Define to 1 if you have the declaration of `pwritev', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#undef HAVE_DECL_PWRITEV
|
|
|
|
|
2018-09-06 10:07:24 +02:00
|
|
|
/* Define to 1 if you have the declaration of `RTLD_GLOBAL', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#undef HAVE_DECL_RTLD_GLOBAL
|
|
|
|
|
|
|
|
/* Define to 1 if you have the declaration of `RTLD_NOW', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#undef HAVE_DECL_RTLD_NOW
|
|
|
|
|
2007-02-07 01:28:55 +01:00
|
|
|
/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#undef HAVE_DECL_STRLCAT
|
|
|
|
|
2006-10-02 02:06:18 +02:00
|
|
|
/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#undef HAVE_DECL_STRLCPY
|
|
|
|
|
2017-10-10 23:42:16 +02:00
|
|
|
/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#undef HAVE_DECL_STRNLEN
|
|
|
|
|
2018-05-19 04:42:10 +02:00
|
|
|
/* Define to 1 if you have the declaration of `strtoll', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#undef HAVE_DECL_STRTOLL
|
|
|
|
|
|
|
|
/* Define to 1 if you have the declaration of `strtoull', and to 0 if you
|
|
|
|
don't. */
|
|
|
|
#undef HAVE_DECL_STRTOULL
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `dlopen' function. */
|
|
|
|
#undef HAVE_DLOPEN
|
2002-09-05 02:43:07 +02:00
|
|
|
|
2006-10-05 02:07:45 +02:00
|
|
|
/* Define to 1 if you have the <editline/history.h> header file. */
|
|
|
|
#undef HAVE_EDITLINE_HISTORY_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <editline/readline.h> header file. */
|
|
|
|
#undef HAVE_EDITLINE_READLINE_H
|
2000-04-14 05:05:35 +02:00
|
|
|
|
2019-11-08 19:44:20 +01:00
|
|
|
/* Define to 1 if you have the <execinfo.h> header file. */
|
|
|
|
#undef HAVE_EXECINFO_H
|
|
|
|
|
2019-11-11 09:50:07 +01:00
|
|
|
/* Define to 1 if you have the `explicit_bzero' function. */
|
|
|
|
#undef HAVE_EXPLICIT_BZERO
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `fdatasync' function. */
|
|
|
|
#undef HAVE_FDATASYNC
|
|
|
|
|
2012-02-07 19:45:46 +01:00
|
|
|
/* Define to 1 if you have the `fls' function. */
|
|
|
|
#undef HAVE_FLS
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
|
|
|
|
#undef HAVE_FSEEKO
|
|
|
|
|
2003-04-24 23:16:45 +02:00
|
|
|
/* Define to 1 if your compiler understands __func__. */
|
|
|
|
#undef HAVE_FUNCNAME__FUNC
|
|
|
|
|
|
|
|
/* Define to 1 if your compiler understands __FUNCTION__. */
|
|
|
|
#undef HAVE_FUNCNAME__FUNCTION
|
|
|
|
|
Add a basic atomic ops API abstracting away platform/architecture details.
Several upcoming performance/scalability improvements require atomic
operations. This new API avoids the need to splatter compiler and
architecture dependent code over all the locations employing atomic
ops.
For several of the potential usages it'd be problematic to maintain
both, a atomics using implementation and one using spinlocks or
similar. In all likelihood one of the implementations would not get
tested regularly under concurrency. To avoid that scenario the new API
provides a automatic fallback of atomic operations to spinlocks. All
properties of atomic operations are maintained. This fallback -
obviously - isn't as fast as just using atomic ops, but it's not bad
either. For one of the future users the atomics ontop spinlocks
implementation was actually slightly faster than the old purely
spinlock using implementation. That's important because it reduces the
fear of regressing older platforms when improving the scalability for
new ones.
The API, loosely modeled after the C11 atomics support, currently
provides 'atomic flags' and 32 bit unsigned integers. If the platform
efficiently supports atomic 64 bit unsigned integers those are also
provided.
To implement atomics support for a platform/architecture/compiler for
a type of atomics 32bit compare and exchange needs to be
implemented. If available and more efficient native support for flags,
32 bit atomic addition, and corresponding 64 bit operations may also
be provided. Additional useful atomic operations are implemented
generically ontop of these.
The implementation for various versions of gcc, msvc and sun studio have
been tested. Additional existing stub implementations for
* Intel icc
* HUPX acc
* IBM xlc
are included but have never been tested. These will likely require
fixes based on buildfarm and user feedback.
As atomic operations also require barriers for some operations the
existing barrier support has been moved into the atomics code.
Author: Andres Freund with contributions from Oskari Saarenmaa
Reviewed-By: Amit Kapila, Robert Haas, Heikki Linnakangas and Álvaro Herrera
Discussion: CA+TgmoYBW+ux5-8Ja=Mcyuy8=VXAnVRHp3Kess6Pn3DMXAPAEA@mail.gmail.com,
20131015123303.GH5300@awork2.anarazel.de,
20131028205522.GI20248@awork2.anarazel.de
2014-09-25 23:49:05 +02:00
|
|
|
/* Define to 1 if you have __atomic_compare_exchange_n(int *, int *, int). */
|
|
|
|
#undef HAVE_GCC__ATOMIC_INT32_CAS
|
|
|
|
|
2018-07-04 22:13:16 +02:00
|
|
|
/* Define to 1 if you have __atomic_compare_exchange_n(int64 *, int64 *,
|
|
|
|
int64). */
|
Add a basic atomic ops API abstracting away platform/architecture details.
Several upcoming performance/scalability improvements require atomic
operations. This new API avoids the need to splatter compiler and
architecture dependent code over all the locations employing atomic
ops.
For several of the potential usages it'd be problematic to maintain
both, a atomics using implementation and one using spinlocks or
similar. In all likelihood one of the implementations would not get
tested regularly under concurrency. To avoid that scenario the new API
provides a automatic fallback of atomic operations to spinlocks. All
properties of atomic operations are maintained. This fallback -
obviously - isn't as fast as just using atomic ops, but it's not bad
either. For one of the future users the atomics ontop spinlocks
implementation was actually slightly faster than the old purely
spinlock using implementation. That's important because it reduces the
fear of regressing older platforms when improving the scalability for
new ones.
The API, loosely modeled after the C11 atomics support, currently
provides 'atomic flags' and 32 bit unsigned integers. If the platform
efficiently supports atomic 64 bit unsigned integers those are also
provided.
To implement atomics support for a platform/architecture/compiler for
a type of atomics 32bit compare and exchange needs to be
implemented. If available and more efficient native support for flags,
32 bit atomic addition, and corresponding 64 bit operations may also
be provided. Additional useful atomic operations are implemented
generically ontop of these.
The implementation for various versions of gcc, msvc and sun studio have
been tested. Additional existing stub implementations for
* Intel icc
* HUPX acc
* IBM xlc
are included but have never been tested. These will likely require
fixes based on buildfarm and user feedback.
As atomic operations also require barriers for some operations the
existing barrier support has been moved into the atomics code.
Author: Andres Freund with contributions from Oskari Saarenmaa
Reviewed-By: Amit Kapila, Robert Haas, Heikki Linnakangas and Álvaro Herrera
Discussion: CA+TgmoYBW+ux5-8Ja=Mcyuy8=VXAnVRHp3Kess6Pn3DMXAPAEA@mail.gmail.com,
20131015123303.GH5300@awork2.anarazel.de,
20131028205522.GI20248@awork2.anarazel.de
2014-09-25 23:49:05 +02:00
|
|
|
#undef HAVE_GCC__ATOMIC_INT64_CAS
|
|
|
|
|
|
|
|
/* Define to 1 if you have __sync_lock_test_and_set(char *) and friends. */
|
|
|
|
#undef HAVE_GCC__SYNC_CHAR_TAS
|
|
|
|
|
2018-07-10 11:14:53 +02:00
|
|
|
/* Define to 1 if you have __sync_val_compare_and_swap(int *, int, int). */
|
Add a basic atomic ops API abstracting away platform/architecture details.
Several upcoming performance/scalability improvements require atomic
operations. This new API avoids the need to splatter compiler and
architecture dependent code over all the locations employing atomic
ops.
For several of the potential usages it'd be problematic to maintain
both, a atomics using implementation and one using spinlocks or
similar. In all likelihood one of the implementations would not get
tested regularly under concurrency. To avoid that scenario the new API
provides a automatic fallback of atomic operations to spinlocks. All
properties of atomic operations are maintained. This fallback -
obviously - isn't as fast as just using atomic ops, but it's not bad
either. For one of the future users the atomics ontop spinlocks
implementation was actually slightly faster than the old purely
spinlock using implementation. That's important because it reduces the
fear of regressing older platforms when improving the scalability for
new ones.
The API, loosely modeled after the C11 atomics support, currently
provides 'atomic flags' and 32 bit unsigned integers. If the platform
efficiently supports atomic 64 bit unsigned integers those are also
provided.
To implement atomics support for a platform/architecture/compiler for
a type of atomics 32bit compare and exchange needs to be
implemented. If available and more efficient native support for flags,
32 bit atomic addition, and corresponding 64 bit operations may also
be provided. Additional useful atomic operations are implemented
generically ontop of these.
The implementation for various versions of gcc, msvc and sun studio have
been tested. Additional existing stub implementations for
* Intel icc
* HUPX acc
* IBM xlc
are included but have never been tested. These will likely require
fixes based on buildfarm and user feedback.
As atomic operations also require barriers for some operations the
existing barrier support has been moved into the atomics code.
Author: Andres Freund with contributions from Oskari Saarenmaa
Reviewed-By: Amit Kapila, Robert Haas, Heikki Linnakangas and Álvaro Herrera
Discussion: CA+TgmoYBW+ux5-8Ja=Mcyuy8=VXAnVRHp3Kess6Pn3DMXAPAEA@mail.gmail.com,
20131015123303.GH5300@awork2.anarazel.de,
20131028205522.GI20248@awork2.anarazel.de
2014-09-25 23:49:05 +02:00
|
|
|
#undef HAVE_GCC__SYNC_INT32_CAS
|
|
|
|
|
2012-01-07 21:38:52 +01:00
|
|
|
/* Define to 1 if you have __sync_lock_test_and_set(int *) and friends. */
|
Add a basic atomic ops API abstracting away platform/architecture details.
Several upcoming performance/scalability improvements require atomic
operations. This new API avoids the need to splatter compiler and
architecture dependent code over all the locations employing atomic
ops.
For several of the potential usages it'd be problematic to maintain
both, a atomics using implementation and one using spinlocks or
similar. In all likelihood one of the implementations would not get
tested regularly under concurrency. To avoid that scenario the new API
provides a automatic fallback of atomic operations to spinlocks. All
properties of atomic operations are maintained. This fallback -
obviously - isn't as fast as just using atomic ops, but it's not bad
either. For one of the future users the atomics ontop spinlocks
implementation was actually slightly faster than the old purely
spinlock using implementation. That's important because it reduces the
fear of regressing older platforms when improving the scalability for
new ones.
The API, loosely modeled after the C11 atomics support, currently
provides 'atomic flags' and 32 bit unsigned integers. If the platform
efficiently supports atomic 64 bit unsigned integers those are also
provided.
To implement atomics support for a platform/architecture/compiler for
a type of atomics 32bit compare and exchange needs to be
implemented. If available and more efficient native support for flags,
32 bit atomic addition, and corresponding 64 bit operations may also
be provided. Additional useful atomic operations are implemented
generically ontop of these.
The implementation for various versions of gcc, msvc and sun studio have
been tested. Additional existing stub implementations for
* Intel icc
* HUPX acc
* IBM xlc
are included but have never been tested. These will likely require
fixes based on buildfarm and user feedback.
As atomic operations also require barriers for some operations the
existing barrier support has been moved into the atomics code.
Author: Andres Freund with contributions from Oskari Saarenmaa
Reviewed-By: Amit Kapila, Robert Haas, Heikki Linnakangas and Álvaro Herrera
Discussion: CA+TgmoYBW+ux5-8Ja=Mcyuy8=VXAnVRHp3Kess6Pn3DMXAPAEA@mail.gmail.com,
20131015123303.GH5300@awork2.anarazel.de,
20131028205522.GI20248@awork2.anarazel.de
2014-09-25 23:49:05 +02:00
|
|
|
#undef HAVE_GCC__SYNC_INT32_TAS
|
|
|
|
|
2018-07-10 11:14:53 +02:00
|
|
|
/* Define to 1 if you have __sync_val_compare_and_swap(int64 *, int64, int64).
|
|
|
|
*/
|
Add a basic atomic ops API abstracting away platform/architecture details.
Several upcoming performance/scalability improvements require atomic
operations. This new API avoids the need to splatter compiler and
architecture dependent code over all the locations employing atomic
ops.
For several of the potential usages it'd be problematic to maintain
both, a atomics using implementation and one using spinlocks or
similar. In all likelihood one of the implementations would not get
tested regularly under concurrency. To avoid that scenario the new API
provides a automatic fallback of atomic operations to spinlocks. All
properties of atomic operations are maintained. This fallback -
obviously - isn't as fast as just using atomic ops, but it's not bad
either. For one of the future users the atomics ontop spinlocks
implementation was actually slightly faster than the old purely
spinlock using implementation. That's important because it reduces the
fear of regressing older platforms when improving the scalability for
new ones.
The API, loosely modeled after the C11 atomics support, currently
provides 'atomic flags' and 32 bit unsigned integers. If the platform
efficiently supports atomic 64 bit unsigned integers those are also
provided.
To implement atomics support for a platform/architecture/compiler for
a type of atomics 32bit compare and exchange needs to be
implemented. If available and more efficient native support for flags,
32 bit atomic addition, and corresponding 64 bit operations may also
be provided. Additional useful atomic operations are implemented
generically ontop of these.
The implementation for various versions of gcc, msvc and sun studio have
been tested. Additional existing stub implementations for
* Intel icc
* HUPX acc
* IBM xlc
are included but have never been tested. These will likely require
fixes based on buildfarm and user feedback.
As atomic operations also require barriers for some operations the
existing barrier support has been moved into the atomics code.
Author: Andres Freund with contributions from Oskari Saarenmaa
Reviewed-By: Amit Kapila, Robert Haas, Heikki Linnakangas and Álvaro Herrera
Discussion: CA+TgmoYBW+ux5-8Ja=Mcyuy8=VXAnVRHp3Kess6Pn3DMXAPAEA@mail.gmail.com,
20131015123303.GH5300@awork2.anarazel.de,
20131028205522.GI20248@awork2.anarazel.de
2014-09-25 23:49:05 +02:00
|
|
|
#undef HAVE_GCC__SYNC_INT64_CAS
|
2012-01-07 21:38:52 +01:00
|
|
|
|
2006-04-29 22:47:31 +02:00
|
|
|
/* Define to 1 if you have the `getaddrinfo' function. */
|
2003-04-07 00:45:23 +02:00
|
|
|
#undef HAVE_GETADDRINFO
|
|
|
|
|
2003-09-13 18:39:51 +02:00
|
|
|
/* Define to 1 if you have the `gethostbyname_r' function. */
|
|
|
|
#undef HAVE_GETHOSTBYNAME_R
|
|
|
|
|
2009-10-01 03:58:58 +02:00
|
|
|
/* Define to 1 if you have the `getifaddrs' function. */
|
|
|
|
#undef HAVE_GETIFADDRS
|
|
|
|
|
2003-05-22 18:39:30 +02:00
|
|
|
/* Define to 1 if you have the `getopt' function. */
|
|
|
|
#undef HAVE_GETOPT
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <getopt.h> header file. */
|
1999-07-19 04:27:16 +02:00
|
|
|
#undef HAVE_GETOPT_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `getopt_long' function. */
|
|
|
|
#undef HAVE_GETOPT_LONG
|
|
|
|
|
|
|
|
/* Define to 1 if you have the `getpeereid' function. */
|
|
|
|
#undef HAVE_GETPEEREID
|
|
|
|
|
2008-11-18 14:10:20 +01:00
|
|
|
/* Define to 1 if you have the `getpeerucred' function. */
|
|
|
|
#undef HAVE_GETPEERUCRED
|
|
|
|
|
2003-09-13 18:39:51 +02:00
|
|
|
/* Define to 1 if you have the `getpwuid_r' function. */
|
|
|
|
#undef HAVE_GETPWUID_R
|
|
|
|
|
2006-10-07 21:25:29 +02:00
|
|
|
/* Define to 1 if you have the `getrlimit' function. */
|
|
|
|
#undef HAVE_GETRLIMIT
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `getrusage' function. */
|
|
|
|
#undef HAVE_GETRUSAGE
|
|
|
|
|
2007-10-29 12:25:42 +01:00
|
|
|
/* Define to 1 if you have the `gettimeofday' function. */
|
|
|
|
#undef HAVE_GETTIMEOFDAY
|
|
|
|
|
2007-07-12 16:36:52 +02:00
|
|
|
/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
|
|
|
|
#undef HAVE_GSSAPI_GSSAPI_H
|
|
|
|
|
|
|
|
/* Define to 1 if you have the <gssapi.h> header file. */
|
|
|
|
#undef HAVE_GSSAPI_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <history.h> header file. */
|
1999-07-18 16:48:30 +02:00
|
|
|
#undef HAVE_HISTORY_H
|
|
|
|
|
2009-09-14 00:18:22 +02:00
|
|
|
/* Define to 1 if you have the `history_truncate_file' function. */
|
|
|
|
#undef HAVE_HISTORY_TRUNCATE_FILE
|
|
|
|
|
Refactor HMAC implementations
Similarly to the cryptohash implementations, this refactors the existing
HMAC code into a single set of APIs that can be plugged with any crypto
libraries PostgreSQL is built with (only OpenSSL currently). If there
is no such libraries, a fallback implementation is available. Those new
APIs are designed similarly to the existing cryptohash layer, so there
is no real new design here, with the same logic around buffer bound
checks and memory handling.
HMAC has a dependency on cryptohashes, so all the cryptohash types
supported by cryptohash{_openssl}.c can be used with HMAC. This
refactoring is an advantage mainly for SCRAM, that included its own
implementation of HMAC with SHA256 without relying on the existing
crypto libraries even if PostgreSQL was built with their support.
This code has been tested on Windows and Linux, with and without
OpenSSL, across all the versions supported on HEAD from 1.1.1 down to
1.0.1. I have also checked that the implementations are working fine
using some sample results, a custom extension of my own, and doing
cross-checks across different major versions with SCRAM with the client
and the backend.
Author: Michael Paquier
Reviewed-by: Bruce Momjian
Discussion: https://postgr.es/m/X9m0nkEJEzIPXjeZ@paquier.xyz
2021-04-03 10:30:49 +02:00
|
|
|
/* Define to 1 if you have the `HMAC_CTX_free' function. */
|
|
|
|
#undef HAVE_HMAC_CTX_FREE
|
|
|
|
|
|
|
|
/* Define to 1 if you have the `HMAC_CTX_new' function. */
|
|
|
|
#undef HAVE_HMAC_CTX_NEW
|
|
|
|
|
2009-10-01 03:58:58 +02:00
|
|
|
/* Define to 1 if you have the <ifaddrs.h> header file. */
|
|
|
|
#undef HAVE_IFADDRS_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `inet_aton' function. */
|
|
|
|
#undef HAVE_INET_ATON
|
2003-03-06 04:16:55 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if the system has the type `int64'. */
|
|
|
|
#undef HAVE_INT64
|
2003-03-06 04:16:55 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if the system has the type `int8'. */
|
|
|
|
#undef HAVE_INT8
|
2000-09-27 17:17:57 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
|
|
|
#undef HAVE_INTTYPES_H
|
2003-02-14 15:05:00 +01:00
|
|
|
|
2009-04-04 23:55:50 +02:00
|
|
|
/* Define to 1 if you have the global variable 'int opterr'. */
|
|
|
|
#undef HAVE_INT_OPTERR
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the global variable 'int optreset'. */
|
|
|
|
#undef HAVE_INT_OPTRESET
|
1997-02-04 09:54:47 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the global variable 'int timezone'. */
|
|
|
|
#undef HAVE_INT_TIMEZONE
|
1997-08-17 02:48:51 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have support for IPv6. */
|
|
|
|
#undef HAVE_IPV6
|
1998-04-05 23:29:49 +02:00
|
|
|
|
2019-10-19 05:20:52 +02:00
|
|
|
/* Define to 1 if __builtin_constant_p(x) implies "i"(x) acceptance. */
|
|
|
|
#undef HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P
|
|
|
|
|
Add kqueue(2) support to the WaitEventSet API.
Use kevent(2) to wait for events on the BSD family of operating
systems and macOS. This is similar to the epoll(2) support added
for Linux by commit 98a64d0bd.
Author: Thomas Munro
Reviewed-by: Andres Freund, Marko Tiikkaja, Tom Lane
Tested-by: Mateusz Guzik, Matteo Beccati, Keith Fiske, Heikki Linnakangas, Michael Paquier, Peter Eisentraut, Rui DeSousa, Tom Lane, Mark Wong
Discussion: https://postgr.es/m/CAEepm%3D37oF84-iXDTQ9MrGjENwVGds%2B5zTr38ca73kWR7ez_tA%40mail.gmail.com
2020-02-05 05:35:57 +01:00
|
|
|
/* Define to 1 if you have the `kqueue' function. */
|
|
|
|
#undef HAVE_KQUEUE
|
|
|
|
|
2004-07-14 19:55:10 +02:00
|
|
|
/* Define to 1 if you have the <langinfo.h> header file. */
|
|
|
|
#undef HAVE_LANGINFO_H
|
|
|
|
|
2006-03-06 18:41:44 +01:00
|
|
|
/* Define to 1 if you have the <ldap.h> header file. */
|
|
|
|
#undef HAVE_LDAP_H
|
|
|
|
|
2018-01-03 16:00:08 +01:00
|
|
|
/* Define to 1 if you have the `ldap_initialize' function. */
|
|
|
|
#undef HAVE_LDAP_INITIALIZE
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
|
|
|
#undef HAVE_LIBCRYPTO
|
2000-10-03 05:11:26 +02:00
|
|
|
|
2006-03-06 18:41:44 +01:00
|
|
|
/* Define to 1 if you have the `ldap' library (-lldap). */
|
|
|
|
#undef HAVE_LIBLDAP
|
|
|
|
|
2021-03-21 22:20:17 +01:00
|
|
|
/* Define to 1 if you have the `lz4' library (-llz4). */
|
|
|
|
#undef HAVE_LIBLZ4
|
|
|
|
|
2006-11-06 04:44:38 +01:00
|
|
|
/* Define to 1 if you have the `m' library (-lm). */
|
|
|
|
#undef HAVE_LIBM
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `pam' library (-lpam). */
|
|
|
|
#undef HAVE_LIBPAM
|
1998-03-31 04:59:07 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define if you have a function readline library */
|
|
|
|
#undef HAVE_LIBREADLINE
|
1999-07-18 22:43:13 +02:00
|
|
|
|
2011-01-27 00:03:55 +01:00
|
|
|
/* Define to 1 if you have the `selinux' library (-lselinux). */
|
|
|
|
#undef HAVE_LIBSELINUX
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `ssl' library (-lssl). */
|
|
|
|
#undef HAVE_LIBSSL
|
1999-12-20 01:51:25 +01:00
|
|
|
|
2006-03-06 18:41:44 +01:00
|
|
|
/* Define to 1 if you have the `wldap32' library (-lwldap32). */
|
|
|
|
#undef HAVE_LIBWLDAP32
|
|
|
|
|
2006-12-21 17:05:16 +01:00
|
|
|
/* Define to 1 if you have the `xml2' library (-lxml2). */
|
|
|
|
#undef HAVE_LIBXML2
|
|
|
|
|
2007-04-15 14:48:24 +02:00
|
|
|
/* Define to 1 if you have the `xslt' library (-lxslt). */
|
|
|
|
#undef HAVE_LIBXSLT
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `z' library (-lz). */
|
|
|
|
#undef HAVE_LIBZ
|
2003-03-29 12:31:52 +01:00
|
|
|
|
2020-03-04 08:05:33 +01:00
|
|
|
/* Define to 1 if you have the `link' function. */
|
|
|
|
#undef HAVE_LINK
|
|
|
|
|
2011-02-08 22:04:18 +01:00
|
|
|
/* Define to 1 if the system has the type `locale_t'. */
|
|
|
|
#undef HAVE_LOCALE_T
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if `long int' works and is 64 bits. */
|
|
|
|
#undef HAVE_LONG_INT_64
|
2003-04-02 02:49:28 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if `long long int' works and is 64 bits. */
|
|
|
|
#undef HAVE_LONG_LONG_INT_64
|
1998-12-13 21:03:07 +01:00
|
|
|
|
2021-03-21 22:20:17 +01:00
|
|
|
/* Define to 1 if you have the <lz4.h> header file. */
|
|
|
|
#undef HAVE_LZ4_H
|
|
|
|
|
2014-10-25 10:27:41 +02:00
|
|
|
/* Define to 1 if you have the <mbarrier.h> header file. */
|
|
|
|
#undef HAVE_MBARRIER_H
|
|
|
|
|
2012-08-31 20:17:56 +02:00
|
|
|
/* Define to 1 if you have the `mbstowcs_l' function. */
|
|
|
|
#undef HAVE_MBSTOWCS_L
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <memory.h> header file. */
|
|
|
|
#undef HAVE_MEMORY_H
|
1997-02-04 09:54:47 +01:00
|
|
|
|
2019-09-05 08:15:58 +02:00
|
|
|
/* Define to 1 if you have the `memset_s' function. */
|
|
|
|
#undef HAVE_MEMSET_S
|
|
|
|
|
2010-12-26 16:34:47 +01:00
|
|
|
/* Define to 1 if the system has the type `MINIDUMP_TYPE'. */
|
|
|
|
#undef HAVE_MINIDUMP_TYPE
|
|
|
|
|
2014-06-14 15:41:13 +02:00
|
|
|
/* Define to 1 if you have the `mkdtemp' function. */
|
|
|
|
#undef HAVE_MKDTEMP
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
|
|
|
#undef HAVE_NETINET_TCP_H
|
1997-04-22 19:47:42 +02:00
|
|
|
|
2009-10-01 03:58:58 +02:00
|
|
|
/* Define to 1 if you have the <net/if.h> header file. */
|
|
|
|
#undef HAVE_NET_IF_H
|
|
|
|
|
2016-09-15 21:29:39 +02:00
|
|
|
/* Define to 1 if you have the `OPENSSL_init_ssl' function. */
|
|
|
|
#undef HAVE_OPENSSL_INIT_SSL
|
|
|
|
|
2007-10-23 23:38:16 +02:00
|
|
|
/* Define to 1 if you have the <ossp/uuid.h> header file. */
|
|
|
|
#undef HAVE_OSSP_UUID_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <pam/pam_appl.h> header file. */
|
|
|
|
#undef HAVE_PAM_PAM_APPL_H
|
1999-10-02 19:45:31 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `poll' function. */
|
|
|
|
#undef HAVE_POLL
|
1997-02-04 09:54:47 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <poll.h> header file. */
|
|
|
|
#undef HAVE_POLL_H
|
1997-02-04 09:54:47 +01:00
|
|
|
|
2009-01-11 19:02:17 +01:00
|
|
|
/* Define to 1 if you have the `posix_fadvise' function. */
|
|
|
|
#undef HAVE_POSIX_FADVISE
|
|
|
|
|
2017-09-25 22:09:19 +02:00
|
|
|
/* Define to 1 if you have the `posix_fallocate' function. */
|
|
|
|
#undef HAVE_POSIX_FALLOCATE
|
|
|
|
|
2012-01-02 04:39:59 +01:00
|
|
|
/* Define to 1 if the assembler supports PPC's LWARX mutex hint bit. */
|
|
|
|
#undef HAVE_PPC_LWARX_MUTEX_HINT
|
|
|
|
|
Use ppoll(2), if available, to wait for input in pgbench.
Previously, pgbench always used select(2) for this purpose, but that's
problematic for very high client counts, because select() can't deal
with file descriptor numbers larger than FD_SETSIZE. It's pretty common
for that to be only 1024 or so, whereas modern OSes can allow many more
open files than that. Using poll(2) would surmount that problem, but it
creates another one: poll()'s timeout resolution is only 1ms, which is
poor enough to cause problems with --rate specifications approaching or
exceeding 1K TPS.
On platforms that have ppoll(2), which includes Linux and recent
FreeBSD, we can use that to avoid the FD_SETSIZE problem without any
loss of timeout resolution. Hence, add configure logic to test for
ppoll(), and use it if available.
This patch introduces an abstraction layer into pgbench that could
be extended to support other kernel event-wait APIs such as kevents.
But actually adding such support is a matter for some future patch.
Doug Rady, reviewed by Robert Haas and Fabien Coelho, and whacked around
a good bit more by me
Discussion: https://postgr.es/m/23D017C9-81B7-484D-8490-FD94DEC4DF59@amazon.com
2018-09-24 20:40:58 +02:00
|
|
|
/* Define to 1 if you have the `ppoll' function. */
|
|
|
|
#undef HAVE_PPOLL
|
|
|
|
|
2018-11-06 21:50:01 +01:00
|
|
|
/* Define to 1 if you have the `pread' function. */
|
|
|
|
#undef HAVE_PREAD
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `pstat' function. */
|
|
|
|
#undef HAVE_PSTAT
|
1997-02-04 09:54:47 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if the PS_STRINGS thing exists. */
|
|
|
|
#undef HAVE_PS_STRINGS
|
1997-02-09 04:33:38 +01:00
|
|
|
|
2015-08-13 13:35:02 +02:00
|
|
|
/* Define if you have POSIX threads libraries and header files. */
|
|
|
|
#undef HAVE_PTHREAD
|
|
|
|
|
2021-03-10 03:40:17 +01:00
|
|
|
/* Define to 1 if you have the `pthread_barrier_wait' function. */
|
|
|
|
#undef HAVE_PTHREAD_BARRIER_WAIT
|
|
|
|
|
2015-01-08 04:35:44 +01:00
|
|
|
/* Define to 1 if you have the `pthread_is_threaded_np' function. */
|
|
|
|
#undef HAVE_PTHREAD_IS_THREADED_NP
|
|
|
|
|
2015-08-13 13:35:02 +02:00
|
|
|
/* Have PTHREAD_PRIO_INHERIT. */
|
|
|
|
#undef HAVE_PTHREAD_PRIO_INHERIT
|
|
|
|
|
2018-11-06 21:50:01 +01:00
|
|
|
/* Define to 1 if you have the `pwrite' function. */
|
|
|
|
#undef HAVE_PWRITE
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `random' function. */
|
|
|
|
#undef HAVE_RANDOM
|
|
|
|
|
|
|
|
/* Define to 1 if you have the <readline.h> header file. */
|
|
|
|
#undef HAVE_READLINE_H
|
|
|
|
|
|
|
|
/* Define to 1 if you have the <readline/history.h> header file. */
|
|
|
|
#undef HAVE_READLINE_HISTORY_H
|
|
|
|
|
|
|
|
/* Define to 1 if you have the <readline/readline.h> header file. */
|
|
|
|
#undef HAVE_READLINE_READLINE_H
|
|
|
|
|
2004-11-07 00:06:29 +01:00
|
|
|
/* Define to 1 if you have the `readlink' function. */
|
|
|
|
#undef HAVE_READLINK
|
|
|
|
|
2021-01-11 02:37:13 +01:00
|
|
|
/* Define to 1 if you have the `readv' function. */
|
|
|
|
#undef HAVE_READV
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the global variable
|
|
|
|
'rl_completion_append_character'. */
|
|
|
|
#undef HAVE_RL_COMPLETION_APPEND_CHARACTER
|
|
|
|
|
|
|
|
/* Define to 1 if you have the `rl_completion_matches' function. */
|
|
|
|
#undef HAVE_RL_COMPLETION_MATCHES
|
|
|
|
|
2020-01-24 00:20:57 +01:00
|
|
|
/* Define to 1 if you have the global variable 'rl_completion_suppress_quote'.
|
|
|
|
*/
|
|
|
|
#undef HAVE_RL_COMPLETION_SUPPRESS_QUOTE
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `rl_filename_completion_function' function. */
|
|
|
|
#undef HAVE_RL_FILENAME_COMPLETION_FUNCTION
|
|
|
|
|
Improve psql's tab completion for filenames.
The Readline library contains a fair amount of knowledge about how to
tab-complete filenames, but it turns out that that doesn't work too well
unless we follow its expectation that we use its filename quoting hooks
to quote and de-quote filenames. We were trying to do such quote handling
within complete_from_files(), and that's still what we have to do if we're
using libedit, which lacks those hooks. But for Readline, it works a lot
better if we tell Readline that single-quote is a quoting character and
then provide hooks that know the details of the quoting rules for SQL
and psql meta-commands.
Hence, resurrect the quoting hook functions that existed in the original
version of tab-complete.c (and were disabled by commit f6689a328 because
they "didn't work so well yet"), and whack on them until they do seem to
work well.
Notably, this fixes bug #16059 from Steven Winfield, who pointed out
that the previous coding would strip quote marks from filenames in SQL
COPY commands, even though they're syntactically necessary there.
Now, we not only don't do that, but we'll add a quote mark when you
tab-complete, even if you didn't type one.
Getting this to work across a range of libedit versions (and, to a
lesser extent, libreadline versions) was depressingly difficult.
It will be interesting to see whether the new regression test cases
pass everywhere in the buildfarm.
Some future patch might try to handle quoted SQL identifiers with
similar explicit quoting/dequoting logic, but that's for another day.
Patch by me, reviewed by Peter Eisentraut.
Discussion: https://postgr.es/m/16059-8836946734c02b84@postgresql.org
2020-01-23 17:07:12 +01:00
|
|
|
/* Define to 1 if you have the global variable 'rl_filename_quote_characters'.
|
|
|
|
*/
|
|
|
|
#undef HAVE_RL_FILENAME_QUOTE_CHARACTERS
|
|
|
|
|
|
|
|
/* Define to 1 if you have the global variable 'rl_filename_quoting_function'.
|
|
|
|
*/
|
|
|
|
#undef HAVE_RL_FILENAME_QUOTING_FUNCTION
|
|
|
|
|
Cope with Readline's failure to track SIGWINCH events outside of input.
It emerges that libreadline doesn't notice terminal window size change
events unless they occur while collecting input. This is easy to stumble
over if you resize the window while using a pager to look at query output,
but it can be demonstrated without any pager involvement. The symptom is
that queries exceeding one line are misdisplayed during subsequent input
cycles, because libreadline has the wrong idea of the screen dimensions.
The safest, simplest way to fix this is to call rl_reset_screen_size()
just before calling readline(). That causes an extra ioctl(TIOCGWINSZ)
for every command; but since it only happens when reading from a tty, the
performance impact should be negligible. A more valid objection is that
this still leaves a tiny window during entry to readline() wherein delivery
of SIGWINCH will be missed; but the practical consequences of that are
probably negligible. In any case, there doesn't seem to be any good way to
avoid the race, since readline exposes no functions that seem safe to call
from a generic signal handler --- rl_reset_screen_size() certainly isn't.
It turns out that we also need an explicit rl_initialize() call, else
rl_reset_screen_size() dumps core when called before the first readline()
call.
rl_reset_screen_size() is not present in old versions of libreadline,
so we need a configure test for that. (rl_initialize() is present at
least back to readline 4.0, so we won't bother with a test for it.)
We would need a configure test anyway since libedit's emulation of
libreadline doesn't currently include such a function. Fortunately,
libedit seems not to have any corresponding bug.
Merlin Moncure, adjusted a bit by me
2015-12-16 22:58:55 +01:00
|
|
|
/* Define to 1 if you have the `rl_reset_screen_size' function. */
|
|
|
|
#undef HAVE_RL_RESET_SCREEN_SIZE
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <security/pam_appl.h> header file. */
|
|
|
|
#undef HAVE_SECURITY_PAM_APPL_H
|
|
|
|
|
Use setenv() in preference to putenv().
Since at least 2001 we've used putenv() and avoided setenv(), on the
grounds that the latter was unportable and not in POSIX. However,
POSIX added it that same year, and by now the situation has reversed:
setenv() is probably more portable than putenv(), since POSIX now
treats the latter as not being a core function. And setenv() has
cleaner semantics too. So, let's reverse that old policy.
This commit adds a simple src/port/ implementation of setenv() for
any stragglers (we have one in the buildfarm, but I'd not be surprised
if that code is never used in the field). More importantly, extend
win32env.c to also support setenv(). Then, replace usages of putenv()
with setenv(), and get rid of some ad-hoc implementations of setenv()
wannabees.
Also, adjust our src/port/ implementation of unsetenv() to follow the
POSIX spec that it returns an error indicator, rather than returning
void as per the ancient BSD convention. I don't feel a need to make
all the call sites check for errors, but the portability stub ought
to match real-world practice.
Discussion: https://postgr.es/m/2065122.1609212051@sss.pgh.pa.us
2020-12-30 18:55:59 +01:00
|
|
|
/* Define to 1 if you have the `setenv' function. */
|
|
|
|
#undef HAVE_SETENV
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `setproctitle' function. */
|
|
|
|
#undef HAVE_SETPROCTITLE
|
|
|
|
|
2018-07-24 03:09:22 +02:00
|
|
|
/* Define to 1 if you have the `setproctitle_fast' function. */
|
|
|
|
#undef HAVE_SETPROCTITLE_FAST
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `setsid' function. */
|
1997-02-09 04:33:38 +01:00
|
|
|
#undef HAVE_SETSID
|
|
|
|
|
2013-10-10 03:05:02 +02:00
|
|
|
/* Define to 1 if you have the `shm_open' function. */
|
|
|
|
#undef HAVE_SHM_OPEN
|
|
|
|
|
2003-09-12 18:10:27 +02:00
|
|
|
/* Define to 1 if you have spinlocks. */
|
|
|
|
#undef HAVE_SPINLOCKS
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `srandom' function. */
|
|
|
|
#undef HAVE_SRANDOM
|
|
|
|
|
2018-03-21 12:43:29 +01:00
|
|
|
/* Define to 1 if stdbool.h conforms to C99. */
|
|
|
|
#undef HAVE_STDBOOL_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <stdint.h> header file. */
|
|
|
|
#undef HAVE_STDINT_H
|
|
|
|
|
|
|
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
|
|
|
#undef HAVE_STDLIB_H
|
|
|
|
|
Make assorted performance improvements in snprintf.c.
In combination, these changes make our version of snprintf as fast
or faster than most platforms' native snprintf, except for cases
involving floating-point conversion (which we still delegate to
the native sprintf). The speed penalty for a float conversion
is down to around 10% though, much better than before.
Notable changes:
* Rather than always parsing the format twice to see if it contains
instances of %n$, do the extra scan only if we actually find a $.
This obviously wins for non-localized formats, and even when there
is use of %n$, we can avoid scanning text before the first % twice.
* Use strchrnul() if available to find the next %, and emit the
literal text between % escapes as strings rather than char-by-char.
* Create a bespoke function (dopr_outchmulti) for the common case
of emitting N copies of the same character, in place of writing
loops around dopr_outch.
* Simplify construction of the format string for invocations of sprintf
for floats.
* Const-ify some internal functions, and avoid unnecessary use of
pass-by-reference arguments.
Patch by me, reviewed by Andres Freund
Discussion: https://postgr.es/m/11787.1534530779@sss.pgh.pa.us
2018-10-03 16:18:15 +02:00
|
|
|
/* Define to 1 if you have the `strchrnul' function. */
|
|
|
|
#undef HAVE_STRCHRNUL
|
|
|
|
|
2003-09-13 18:39:51 +02:00
|
|
|
/* Define to 1 if you have the `strerror_r' function. */
|
|
|
|
#undef HAVE_STRERROR_R
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <strings.h> header file. */
|
|
|
|
#undef HAVE_STRINGS_H
|
|
|
|
|
|
|
|
/* Define to 1 if you have the <string.h> header file. */
|
|
|
|
#undef HAVE_STRING_H
|
|
|
|
|
2007-02-07 01:28:55 +01:00
|
|
|
/* Define to 1 if you have the `strlcat' function. */
|
|
|
|
#undef HAVE_STRLCAT
|
|
|
|
|
2006-09-27 18:29:46 +02:00
|
|
|
/* Define to 1 if you have the `strlcpy' function. */
|
|
|
|
#undef HAVE_STRLCPY
|
|
|
|
|
2017-10-10 00:20:42 +02:00
|
|
|
/* Define to 1 if you have the `strnlen' function. */
|
|
|
|
#undef HAVE_STRNLEN
|
|
|
|
|
Modernize our code for looking up descriptive strings for Unix signals.
At least as far back as the 2008 spec, POSIX has defined strsignal(3)
for looking up descriptive strings for signal numbers. We hadn't gotten
the word though, and were still using the crufty old sys_siglist array,
which is in no standard even though most Unixen provide it.
Aside from not being formally standards-compliant, this was just plain
ugly because it involved #ifdef's at every place using the code.
To eliminate the #ifdef's, create a portability function pg_strsignal,
which wraps strsignal(3) if available and otherwise falls back to
sys_siglist[] if available. The set of Unixen with neither API is
probably empty these days, but on any platform with neither, you'll
just get "unrecognized signal". All extant callers print the numeric
signal number too, so no need to work harder than that.
Along the way, upgrade pg_basebackup's child-error-exit reporting
to match the rest of the system.
Discussion: https://postgr.es/m/25758.1544983503@sss.pgh.pa.us
2018-12-17 01:38:57 +01:00
|
|
|
/* Define to 1 if you have the `strsignal' function. */
|
|
|
|
#undef HAVE_STRSIGNAL
|
|
|
|
|
2019-02-13 16:19:44 +01:00
|
|
|
/* Define to 1 if you have the `strtof' function. */
|
|
|
|
#undef HAVE_STRTOF
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `strtoll' function. */
|
|
|
|
#undef HAVE_STRTOLL
|
|
|
|
|
|
|
|
/* Define to 1 if you have the `strtoq' function. */
|
|
|
|
#undef HAVE_STRTOQ
|
|
|
|
|
|
|
|
/* Define to 1 if you have the `strtoull' function. */
|
|
|
|
#undef HAVE_STRTOULL
|
1997-02-13 09:33:28 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the `strtouq' function. */
|
|
|
|
#undef HAVE_STRTOUQ
|
1997-09-18 18:09:41 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if the system has the type `struct addrinfo'. */
|
|
|
|
#undef HAVE_STRUCT_ADDRINFO
|
1997-09-18 18:09:41 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if the system has the type `struct cmsgcred'. */
|
|
|
|
#undef HAVE_STRUCT_CMSGCRED
|
2000-08-07 02:51:42 +02:00
|
|
|
|
2003-08-07 23:11:58 +02:00
|
|
|
/* Define to 1 if the system has the type `struct option'. */
|
|
|
|
#undef HAVE_STRUCT_OPTION
|
|
|
|
|
2013-12-19 02:53:23 +01:00
|
|
|
/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */
|
2003-07-24 01:30:41 +02:00
|
|
|
#undef HAVE_STRUCT_SOCKADDR_SA_LEN
|
|
|
|
|
2003-06-12 09:36:51 +02:00
|
|
|
/* Define to 1 if the system has the type `struct sockaddr_storage'. */
|
|
|
|
#undef HAVE_STRUCT_SOCKADDR_STORAGE
|
|
|
|
|
2013-12-19 02:53:23 +01:00
|
|
|
/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
|
2003-06-24 01:52:00 +02:00
|
|
|
#undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
|
|
|
|
|
2013-12-19 02:53:23 +01:00
|
|
|
/* Define to 1 if `ss_len' is a member of `struct sockaddr_storage'. */
|
2003-07-24 01:30:41 +02:00
|
|
|
#undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN
|
|
|
|
|
2013-12-19 02:53:23 +01:00
|
|
|
/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */
|
2003-06-24 01:52:00 +02:00
|
|
|
#undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY
|
|
|
|
|
2013-12-19 02:53:23 +01:00
|
|
|
/* Define to 1 if `__ss_len' is a member of `struct sockaddr_storage'. */
|
2003-07-24 01:30:41 +02:00
|
|
|
#undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN
|
|
|
|
|
2020-03-28 13:01:42 +01:00
|
|
|
/* Define to 1 if the system has the type `struct sockaddr_un'. */
|
|
|
|
#undef HAVE_STRUCT_SOCKADDR_UN
|
|
|
|
|
2013-12-19 02:53:23 +01:00
|
|
|
/* Define to 1 if `tm_zone' is a member of `struct tm'. */
|
2003-04-07 00:45:23 +02:00
|
|
|
#undef HAVE_STRUCT_TM_TM_ZONE
|
2003-01-25 06:19:47 +01:00
|
|
|
|
2003-05-07 05:47:08 +02:00
|
|
|
/* Define to 1 if you have the `symlink' function. */
|
|
|
|
#undef HAVE_SYMLINK
|
|
|
|
|
2021-03-19 23:46:32 +01:00
|
|
|
/* Define to 1 if you have the `syncfs' function. */
|
|
|
|
#undef HAVE_SYNCFS
|
|
|
|
|
2012-07-13 23:16:58 +02:00
|
|
|
/* Define to 1 if you have the `sync_file_range' function. */
|
|
|
|
#undef HAVE_SYNC_FILE_RANGE
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the syslog interface. */
|
|
|
|
#undef HAVE_SYSLOG
|
1997-02-04 09:54:47 +01:00
|
|
|
|
Introduce WaitEventSet API.
Commit ac1d794 ("Make idle backends exit if the postmaster dies.")
introduced a regression on, at least, large linux systems. Constantly
adding the same postmaster_alive_fds to the OSs internal datastructures
for implementing poll/select can cause significant contention; leading
to a performance regression of nearly 3x in one example.
This can be avoided by using e.g. linux' epoll, which avoids having to
add/remove file descriptors to the wait datastructures at a high rate.
Unfortunately the current latch interface makes it hard to allocate any
persistent per-backend resources.
Replace, with a backward compatibility layer, WaitLatchOrSocket with a
new WaitEventSet API. Users can allocate such a Set across multiple
calls, and add more than one file-descriptor to wait on. The latter has
been added because there's upcoming postgres features where that will be
helpful.
In addition to the previously existing poll(2), select(2),
WaitForMultipleObjects() implementations also provide an epoll_wait(2)
based implementation to address the aforementioned performance
problem. Epoll is only available on linux, but that is the most likely
OS for machines large enough (four sockets) to reproduce the problem.
To actually address the aforementioned regression, create and use a
long-lived WaitEventSet for FE/BE communication. There are additional
places that would benefit from a long-lived set, but that's a task for
another day.
Thanks to Amit Kapila, who helped make the windows code I blindly wrote
actually work.
Reported-By: Dmitry Vasilyev Discussion:
CAB-SwXZh44_2ybvS5Z67p_CDz=XFn4hNAD=CnMEF+QqkXwFrGg@mail.gmail.com
20160114143931.GG10941@awork2.anarazel.de
2016-03-21 09:56:39 +01:00
|
|
|
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
|
|
|
#undef HAVE_SYS_EPOLL_H
|
|
|
|
|
Add kqueue(2) support to the WaitEventSet API.
Use kevent(2) to wait for events on the BSD family of operating
systems and macOS. This is similar to the epoll(2) support added
for Linux by commit 98a64d0bd.
Author: Thomas Munro
Reviewed-by: Andres Freund, Marko Tiikkaja, Tom Lane
Tested-by: Mateusz Guzik, Matteo Beccati, Keith Fiske, Heikki Linnakangas, Michael Paquier, Peter Eisentraut, Rui DeSousa, Tom Lane, Mark Wong
Discussion: https://postgr.es/m/CAEepm%3D37oF84-iXDTQ9MrGjENwVGds%2B5zTr38ca73kWR7ez_tA%40mail.gmail.com
2020-02-05 05:35:57 +01:00
|
|
|
/* Define to 1 if you have the <sys/event.h> header file. */
|
|
|
|
#undef HAVE_SYS_EVENT_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <sys/ipc.h> header file. */
|
|
|
|
#undef HAVE_SYS_IPC_H
|
2000-01-22 00:32:36 +01:00
|
|
|
|
2023-02-08 05:09:27 +01:00
|
|
|
/* Define to 1 if you have the <sys/personality.h> header file. */
|
|
|
|
#undef HAVE_SYS_PERSONALITY_H
|
|
|
|
|
2018-07-11 02:40:58 +02:00
|
|
|
/* Define to 1 if you have the <sys/prctl.h> header file. */
|
|
|
|
#undef HAVE_SYS_PRCTL_H
|
|
|
|
|
2018-07-11 02:47:42 +02:00
|
|
|
/* Define to 1 if you have the <sys/procctl.h> header file. */
|
|
|
|
#undef HAVE_SYS_PROCCTL_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <sys/pstat.h> header file. */
|
|
|
|
#undef HAVE_SYS_PSTAT_H
|
2001-06-12 00:12:48 +02:00
|
|
|
|
2006-10-07 21:25:29 +02:00
|
|
|
/* Define to 1 if you have the <sys/resource.h> header file. */
|
|
|
|
#undef HAVE_SYS_RESOURCE_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <sys/select.h> header file. */
|
|
|
|
#undef HAVE_SYS_SELECT_H
|
2003-02-19 05:04:04 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <sys/sem.h> header file. */
|
|
|
|
#undef HAVE_SYS_SEM_H
|
1999-11-04 22:46:40 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <sys/shm.h> header file. */
|
|
|
|
#undef HAVE_SYS_SHM_H
|
1997-02-06 06:30:50 +01:00
|
|
|
|
2022-02-09 20:24:55 +01:00
|
|
|
/* Define to 1 if you have the <sys/signalfd.h> header file. */
|
|
|
|
#undef HAVE_SYS_SIGNALFD_H
|
|
|
|
|
2009-10-01 03:58:58 +02:00
|
|
|
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
|
|
|
#undef HAVE_SYS_SOCKIO_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
|
|
|
#undef HAVE_SYS_STAT_H
|
2001-09-07 21:52:54 +02:00
|
|
|
|
2007-05-04 17:20:52 +02:00
|
|
|
/* Define to 1 if you have the <sys/tas.h> header file. */
|
|
|
|
#undef HAVE_SYS_TAS_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
|
|
#undef HAVE_SYS_TYPES_H
|
2001-09-07 21:52:54 +02:00
|
|
|
|
Replace use of credential control messages with getsockopt(LOCAL_PEERCRED).
It turns out the reason we hadn't found out about the portability issues
with our credential-control-message code is that almost no modern platforms
use that code at all; the ones that used to need it now offer getpeereid(),
which we choose first. The last holdout was NetBSD, and they added
getpeereid() as of 5.0. So far as I can tell, the only live platform on
which that code was being exercised was Debian/kFreeBSD, ie, FreeBSD kernel
with Linux userland --- since glibc doesn't provide getpeereid(), we fell
back to the control message code. However, the FreeBSD kernel provides a
LOCAL_PEERCRED socket parameter that's functionally equivalent to Linux's
SO_PEERCRED. That is both much simpler to use than control messages, and
superior because it doesn't require receiving a message from the other end
at just the right time.
Therefore, add code to use LOCAL_PEERCRED when necessary, and rip out all
the credential-control-message code in the backend. (libpq still has such
code so that it can still talk to pre-9.1 servers ... but eventually we can
get rid of it there too.) Clean up related autoconf probes, too.
This means that libpq's requirepeer parameter now works on exactly the same
platforms where the backend supports peer authentication, so adjust the
documentation accordingly.
2011-05-31 22:10:46 +02:00
|
|
|
/* Define to 1 if you have the <sys/ucred.h> header file. */
|
|
|
|
#undef HAVE_SYS_UCRED_H
|
|
|
|
|
2021-01-11 02:37:13 +01:00
|
|
|
/* Define to 1 if you have the <sys/uio.h> header file. */
|
|
|
|
#undef HAVE_SYS_UIO_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <sys/un.h> header file. */
|
|
|
|
#undef HAVE_SYS_UN_H
|
2000-09-27 17:17:57 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <termios.h> header file. */
|
|
|
|
#undef HAVE_TERMIOS_H
|
2003-04-02 02:49:28 +02:00
|
|
|
|
2017-03-09 21:18:59 +01:00
|
|
|
/* Define to 1 if your compiler understands `typeof' or something similar. */
|
|
|
|
#undef HAVE_TYPEOF
|
|
|
|
|
2008-11-18 14:10:20 +01:00
|
|
|
/* Define to 1 if you have the <ucred.h> header file. */
|
|
|
|
#undef HAVE_UCRED_H
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if the system has the type `uint64'. */
|
|
|
|
#undef HAVE_UINT64
|
2002-02-23 05:17:47 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if the system has the type `uint8'. */
|
|
|
|
#undef HAVE_UINT8
|
2002-02-23 05:17:47 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if the system has the type `union semun'. */
|
|
|
|
#undef HAVE_UNION_SEMUN
|
1998-08-24 00:25:54 +02:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the <unistd.h> header file. */
|
|
|
|
#undef HAVE_UNISTD_H
|
1998-08-24 00:25:54 +02:00
|
|
|
|
2004-05-05 23:18:29 +02:00
|
|
|
/* Define to 1 if you have the `unsetenv' function. */
|
|
|
|
#undef HAVE_UNSETENV
|
|
|
|
|
Avoid thread-safety problem in ecpglib.
ecpglib attempts to force the LC_NUMERIC locale to "C" while reading
server output, to avoid problems with strtod() and related functions.
Historically it's just issued setlocale() calls to do that, but that
has major problems if we're in a threaded application. setlocale()
itself is not required by POSIX to be thread-safe (and indeed is not,
on recent OpenBSD). Moreover, its effects are process-wide, so that
we could cause unexpected results in other threads, or another thread
could change our setting.
On platforms having uselocale(), which is required by POSIX:2008,
we can avoid these problems by using uselocale() instead. Windows
goes its own way as usual, but we can make it safe by using
_configthreadlocale(). Platforms having neither continue to use the
old code, but that should be pretty much nobody among current systems.
This should get back-patched, but let's see what the buildfarm
thinks of it first.
Michael Meskes and Tom Lane; thanks also to Takayuki Tsunakawa.
Discussion: https://postgr.es/m/31420.1547783697@sss.pgh.pa.us
2019-01-21 18:07:02 +01:00
|
|
|
/* Define to 1 if you have the `uselocale' function. */
|
|
|
|
#undef HAVE_USELOCALE
|
|
|
|
|
2014-05-28 01:42:08 +02:00
|
|
|
/* Define to 1 if you have BSD UUID support. */
|
|
|
|
#undef HAVE_UUID_BSD
|
|
|
|
|
|
|
|
/* Define to 1 if you have E2FS UUID support. */
|
|
|
|
#undef HAVE_UUID_E2FS
|
|
|
|
|
2007-10-23 23:38:16 +02:00
|
|
|
/* Define to 1 if you have the <uuid.h> header file. */
|
|
|
|
#undef HAVE_UUID_H
|
|
|
|
|
2014-05-28 01:42:08 +02:00
|
|
|
/* Define to 1 if you have OSSP UUID support. */
|
|
|
|
#undef HAVE_UUID_OSSP
|
|
|
|
|
|
|
|
/* Define to 1 if you have the <uuid/uuid.h> header file. */
|
|
|
|
#undef HAVE_UUID_UUID_H
|
|
|
|
|
2011-04-23 18:35:41 +02:00
|
|
|
/* Define to 1 if you have the `wcstombs_l' function. */
|
|
|
|
#undef HAVE_WCSTOMBS_L
|
|
|
|
|
2004-05-22 02:34:51 +02:00
|
|
|
/* Define to 1 if you have the <wctype.h> header file. */
|
|
|
|
#undef HAVE_WCTYPE_H
|
|
|
|
|
2006-03-06 18:41:44 +01:00
|
|
|
/* Define to 1 if you have the <winldap.h> header file. */
|
|
|
|
#undef HAVE_WINLDAP_H
|
|
|
|
|
2021-01-11 02:37:13 +01:00
|
|
|
/* Define to 1 if you have the `writev' function. */
|
|
|
|
#undef HAVE_WRITEV
|
|
|
|
|
Fix handling of SCRAM-SHA-256's channel binding with RSA-PSS certificates
OpenSSL 1.1.1 and newer versions have added support for RSA-PSS
certificates, which requires the use of a specific routine in OpenSSL to
determine which hash function to use when compiling it when using
channel binding in SCRAM-SHA-256. X509_get_signature_nid(), that is the
original routine the channel binding code has relied on, is not able to
determine which hash algorithm to use for such certificates. However,
X509_get_signature_info(), new to OpenSSL 1.1.1, is able to do it. This
commit switches the channel binding logic to rely on
X509_get_signature_info() over X509_get_signature_nid(), which would be
the choice when building with 1.1.1 or newer.
The error could have been triggered on the client or the server, hence
libpq and the backend need to have their related code paths patched.
Note that attempting to load an RSA-PSS certificate with OpenSSL 1.1.0
or older leads to a failure due to an unsupported algorithm.
The discovery of relying on X509_get_signature_info() comes from Jacob,
the tests have been written by Heikki (with few tweaks from me), while I
have bundled the whole together while adding the bits needed for MSVC
and meson.
This issue exists since channel binding exists, so backpatch all the way
down. Some tests are added in 15~, triggered if compiling with OpenSSL
1.1.1 or newer, where the certificate and key files can easily be
generated for RSA-PSS.
Reported-by: Gunnar "Nick" Bluth
Author: Jacob Champion, Heikki Linnakangas
Discussion: https://postgr.es/m/17760-b6c61e752ec07060@postgresql.org
Backpatch-through: 11
2023-02-15 02:12:33 +01:00
|
|
|
/* Define to 1 if you have the `X509_get_signature_info' function. */
|
|
|
|
#undef HAVE_X509_GET_SIGNATURE_INFO
|
|
|
|
|
2018-01-05 01:09:27 +01:00
|
|
|
/* Define to 1 if you have the `X509_get_signature_nid' function. */
|
|
|
|
#undef HAVE_X509_GET_SIGNATURE_NID
|
|
|
|
|
Make use of compiler builtins and/or assembly for CLZ, CTZ, POPCNT.
Test for the compiler builtins __builtin_clz, __builtin_ctz, and
__builtin_popcount, and make use of these in preference to
handwritten C code if they're available. Create src/port
infrastructure for "leftmost one", "rightmost one", and "popcount"
so as to centralize these decisions.
On x86_64, __builtin_popcount generally won't make use of the POPCNT
opcode because that's not universally supported yet. Provide code
that checks CPUID and then calls POPCNT via asm() if available.
This requires indirecting through a function pointer, which is
an annoying amount of overhead for a one-instruction operation,
but it's probably not worth working harder than this for our
current use-cases.
I'm not sure we've found all the existing places that could profit
from this new infrastructure; but we at least touched all the
ones that used copied-and-pasted versions of the bitmapset.c code,
and got rid of multiple copies of the associated constant arrays.
While at it, replace c-compiler.m4's one-per-builtin-function
macros with a single one that can handle all the cases we need
to worry about so far. Also, because I'm paranoid, make those
checks into AC_LINK checks rather than just AC_COMPILE; the
former coding failed to verify that libgcc has support for the
builtin, in cases where it's not inline code.
David Rowley, Thomas Munro, Alvaro Herrera, Tom Lane
Discussion: https://postgr.es/m/CAKJS1f9WTAGG1tPeJnD18hiQW5gAk59fQ6WK-vfdAKEHyRg2RA@mail.gmail.com
2019-02-16 05:22:27 +01:00
|
|
|
/* Define to 1 if the assembler supports X86_64's POPCNTQ instruction. */
|
|
|
|
#undef HAVE_X86_64_POPCNTQ
|
|
|
|
|
2018-03-21 12:43:29 +01:00
|
|
|
/* Define to 1 if the system has the type `_Bool'. */
|
|
|
|
#undef HAVE__BOOL
|
|
|
|
|
2017-09-30 00:52:55 +02:00
|
|
|
/* Define to 1 if your compiler understands __builtin_bswap16. */
|
|
|
|
#undef HAVE__BUILTIN_BSWAP16
|
|
|
|
|
2015-02-10 09:54:40 +01:00
|
|
|
/* Define to 1 if your compiler understands __builtin_bswap32. */
|
|
|
|
#undef HAVE__BUILTIN_BSWAP32
|
|
|
|
|
2015-10-08 19:01:36 +02:00
|
|
|
/* Define to 1 if your compiler understands __builtin_bswap64. */
|
|
|
|
#undef HAVE__BUILTIN_BSWAP64
|
|
|
|
|
Make use of compiler builtins and/or assembly for CLZ, CTZ, POPCNT.
Test for the compiler builtins __builtin_clz, __builtin_ctz, and
__builtin_popcount, and make use of these in preference to
handwritten C code if they're available. Create src/port
infrastructure for "leftmost one", "rightmost one", and "popcount"
so as to centralize these decisions.
On x86_64, __builtin_popcount generally won't make use of the POPCNT
opcode because that's not universally supported yet. Provide code
that checks CPUID and then calls POPCNT via asm() if available.
This requires indirecting through a function pointer, which is
an annoying amount of overhead for a one-instruction operation,
but it's probably not worth working harder than this for our
current use-cases.
I'm not sure we've found all the existing places that could profit
from this new infrastructure; but we at least touched all the
ones that used copied-and-pasted versions of the bitmapset.c code,
and got rid of multiple copies of the associated constant arrays.
While at it, replace c-compiler.m4's one-per-builtin-function
macros with a single one that can handle all the cases we need
to worry about so far. Also, because I'm paranoid, make those
checks into AC_LINK checks rather than just AC_COMPILE; the
former coding failed to verify that libgcc has support for the
builtin, in cases where it's not inline code.
David Rowley, Thomas Munro, Alvaro Herrera, Tom Lane
Discussion: https://postgr.es/m/CAKJS1f9WTAGG1tPeJnD18hiQW5gAk59fQ6WK-vfdAKEHyRg2RA@mail.gmail.com
2019-02-16 05:22:27 +01:00
|
|
|
/* Define to 1 if your compiler understands __builtin_clz. */
|
|
|
|
#undef HAVE__BUILTIN_CLZ
|
|
|
|
|
Improve handling of ereport(ERROR) and elog(ERROR).
In commit 71450d7fd6c7cf7b3e38ac56e363bff6a681973c, we added code to inform
suitably-intelligent compilers that ereport() doesn't return if the elevel
is ERROR or higher. This patch extends that to elog(), and also fixes a
double-evaluation hazard that the previous commit created in ereport(),
as well as reducing the emitted code size.
The elog() improvement requires the compiler to support __VA_ARGS__, which
should be available in just about anything nowadays since it's required by
C99. But our minimum language baseline is still C89, so add a configure
test for that.
The previous commit assumed that ereport's elevel could be evaluated twice,
which isn't terribly safe --- there are already counterexamples in xlog.c.
On compilers that have __builtin_constant_p, we can use that to protect the
second test, since there's no possible optimization gain if the compiler
doesn't know the value of elevel. Otherwise, use a local variable inside
the macros to prevent double evaluation. The local-variable solution is
inferior because (a) it leads to useless code being emitted when elevel
isn't constant, and (b) it increases the optimization level needed for the
compiler to recognize that subsequent code is unreachable. But it seems
better than not teaching non-gcc compilers about unreachability at all.
Lastly, if the compiler has __builtin_unreachable(), we can use that
instead of abort(), resulting in a noticeable code savings since no
function call is actually emitted. However, it seems wise to do this only
in non-assert builds. In an assert build, continue to use abort(), so that
the behavior will be predictable and debuggable if the "impossible"
happens.
These changes involve making the ereport and elog macros emit do-while
statement blocks not just expressions, which forces small changes in
a few call sites.
Andres Freund, Tom Lane, Heikki Linnakangas
2013-01-14 00:39:20 +01:00
|
|
|
/* Define to 1 if your compiler understands __builtin_constant_p. */
|
|
|
|
#undef HAVE__BUILTIN_CONSTANT_P
|
|
|
|
|
Make use of compiler builtins and/or assembly for CLZ, CTZ, POPCNT.
Test for the compiler builtins __builtin_clz, __builtin_ctz, and
__builtin_popcount, and make use of these in preference to
handwritten C code if they're available. Create src/port
infrastructure for "leftmost one", "rightmost one", and "popcount"
so as to centralize these decisions.
On x86_64, __builtin_popcount generally won't make use of the POPCNT
opcode because that's not universally supported yet. Provide code
that checks CPUID and then calls POPCNT via asm() if available.
This requires indirecting through a function pointer, which is
an annoying amount of overhead for a one-instruction operation,
but it's probably not worth working harder than this for our
current use-cases.
I'm not sure we've found all the existing places that could profit
from this new infrastructure; but we at least touched all the
ones that used copied-and-pasted versions of the bitmapset.c code,
and got rid of multiple copies of the associated constant arrays.
While at it, replace c-compiler.m4's one-per-builtin-function
macros with a single one that can handle all the cases we need
to worry about so far. Also, because I'm paranoid, make those
checks into AC_LINK checks rather than just AC_COMPILE; the
former coding failed to verify that libgcc has support for the
builtin, in cases where it's not inline code.
David Rowley, Thomas Munro, Alvaro Herrera, Tom Lane
Discussion: https://postgr.es/m/CAKJS1f9WTAGG1tPeJnD18hiQW5gAk59fQ6WK-vfdAKEHyRg2RA@mail.gmail.com
2019-02-16 05:22:27 +01:00
|
|
|
/* Define to 1 if your compiler understands __builtin_ctz. */
|
|
|
|
#undef HAVE__BUILTIN_CTZ
|
|
|
|
|
2022-02-18 04:45:34 +01:00
|
|
|
/* Define to 1 if your compiler understands __builtin_frame_address. */
|
|
|
|
#undef HAVE__BUILTIN_FRAME_ADDRESS
|
|
|
|
|
2017-10-30 06:13:54 +01:00
|
|
|
/* Define to 1 if your compiler understands __builtin_$op_overflow. */
|
|
|
|
#undef HAVE__BUILTIN_OP_OVERFLOW
|
|
|
|
|
Make use of compiler builtins and/or assembly for CLZ, CTZ, POPCNT.
Test for the compiler builtins __builtin_clz, __builtin_ctz, and
__builtin_popcount, and make use of these in preference to
handwritten C code if they're available. Create src/port
infrastructure for "leftmost one", "rightmost one", and "popcount"
so as to centralize these decisions.
On x86_64, __builtin_popcount generally won't make use of the POPCNT
opcode because that's not universally supported yet. Provide code
that checks CPUID and then calls POPCNT via asm() if available.
This requires indirecting through a function pointer, which is
an annoying amount of overhead for a one-instruction operation,
but it's probably not worth working harder than this for our
current use-cases.
I'm not sure we've found all the existing places that could profit
from this new infrastructure; but we at least touched all the
ones that used copied-and-pasted versions of the bitmapset.c code,
and got rid of multiple copies of the associated constant arrays.
While at it, replace c-compiler.m4's one-per-builtin-function
macros with a single one that can handle all the cases we need
to worry about so far. Also, because I'm paranoid, make those
checks into AC_LINK checks rather than just AC_COMPILE; the
former coding failed to verify that libgcc has support for the
builtin, in cases where it's not inline code.
David Rowley, Thomas Munro, Alvaro Herrera, Tom Lane
Discussion: https://postgr.es/m/CAKJS1f9WTAGG1tPeJnD18hiQW5gAk59fQ6WK-vfdAKEHyRg2RA@mail.gmail.com
2019-02-16 05:22:27 +01:00
|
|
|
/* Define to 1 if your compiler understands __builtin_popcount. */
|
|
|
|
#undef HAVE__BUILTIN_POPCOUNT
|
|
|
|
|
2012-09-30 20:38:31 +02:00
|
|
|
/* Define to 1 if your compiler understands __builtin_types_compatible_p. */
|
|
|
|
#undef HAVE__BUILTIN_TYPES_COMPATIBLE_P
|
|
|
|
|
Improve handling of ereport(ERROR) and elog(ERROR).
In commit 71450d7fd6c7cf7b3e38ac56e363bff6a681973c, we added code to inform
suitably-intelligent compilers that ereport() doesn't return if the elevel
is ERROR or higher. This patch extends that to elog(), and also fixes a
double-evaluation hazard that the previous commit created in ereport(),
as well as reducing the emitted code size.
The elog() improvement requires the compiler to support __VA_ARGS__, which
should be available in just about anything nowadays since it's required by
C99. But our minimum language baseline is still C89, so add a configure
test for that.
The previous commit assumed that ereport's elevel could be evaluated twice,
which isn't terribly safe --- there are already counterexamples in xlog.c.
On compilers that have __builtin_constant_p, we can use that to protect the
second test, since there's no possible optimization gain if the compiler
doesn't know the value of elevel. Otherwise, use a local variable inside
the macros to prevent double evaluation. The local-variable solution is
inferior because (a) it leads to useless code being emitted when elevel
isn't constant, and (b) it increases the optimization level needed for the
compiler to recognize that subsequent code is unreachable. But it seems
better than not teaching non-gcc compilers about unreachability at all.
Lastly, if the compiler has __builtin_unreachable(), we can use that
instead of abort(), resulting in a noticeable code savings since no
function call is actually emitted. However, it seems wise to do this only
in non-assert builds. In an assert build, continue to use abort(), so that
the behavior will be predictable and debuggable if the "impossible"
happens.
These changes involve making the ereport and elog macros emit do-while
statement blocks not just expressions, which forces small changes in
a few call sites.
Andres Freund, Tom Lane, Heikki Linnakangas
2013-01-14 00:39:20 +01:00
|
|
|
/* Define to 1 if your compiler understands __builtin_unreachable. */
|
|
|
|
#undef HAVE__BUILTIN_UNREACHABLE
|
|
|
|
|
2019-01-21 22:17:10 +01:00
|
|
|
/* Define to 1 if you have the `_configthreadlocale' function. */
|
|
|
|
#undef HAVE__CONFIGTHREADLOCALE
|
|
|
|
|
Use Intel SSE 4.2 CRC instructions where available.
Modern x86 and x86-64 processors with SSE 4.2 support have special
instructions, crc32b and crc32q, for calculating CRC-32C. They greatly
speed up CRC calculation.
Whether the instructions can be used or not depends on the compiler and the
target architecture. If generation of SSE 4.2 instructions is allowed for
the target (-msse4.2 flag on gcc and clang), use them. If they are not
allowed by default, but the compiler supports the -msse4.2 flag to enable
them, compile just the CRC-32C function with -msse4.2 flag, and check at
runtime whether the processor we're running on supports it. If it doesn't,
fall back to the slicing-by-8 algorithm. (With the common defaults on
current operating systems, the runtime-check variant is what you get in
practice.)
Abhijit Menon-Sen, heavily modified by me, reviewed by Andres Freund.
2015-04-14 16:05:03 +02:00
|
|
|
/* Define to 1 if you have __cpuid. */
|
|
|
|
#undef HAVE__CPUID
|
|
|
|
|
|
|
|
/* Define to 1 if you have __get_cpuid. */
|
|
|
|
#undef HAVE__GET_CPUID
|
|
|
|
|
2012-09-30 20:38:31 +02:00
|
|
|
/* Define to 1 if your compiler understands _Static_assert. */
|
|
|
|
#undef HAVE__STATIC_ASSERT
|
|
|
|
|
2018-05-19 20:22:18 +02:00
|
|
|
/* Define to 1 if you have the `__strtoll' function. */
|
|
|
|
#undef HAVE___STRTOLL
|
|
|
|
|
|
|
|
/* Define to 1 if you have the `__strtoull' function. */
|
|
|
|
#undef HAVE___STRTOULL
|
|
|
|
|
2018-05-23 20:19:04 +02:00
|
|
|
/* Define to the appropriate printf length modifier for 64-bit ints. */
|
2014-08-21 08:56:44 +02:00
|
|
|
#undef INT64_MODIFIER
|
2000-06-17 02:10:40 +02:00
|
|
|
|
2011-02-08 22:04:18 +01:00
|
|
|
/* Define to 1 if `locale_t' requires <xlocale.h>. */
|
|
|
|
#undef LOCALE_T_IN_XLOCALE
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define as the maximum alignment requirement of any C data type. */
|
|
|
|
#undef MAXIMUM_ALIGNOF
|
2000-11-20 16:56:14 +01:00
|
|
|
|
2006-02-03 14:53:15 +01:00
|
|
|
/* Define bytes to use libc memset(). */
|
|
|
|
#undef MEMSET_LOOP_LIMIT
|
|
|
|
|
2020-07-19 12:14:42 +02:00
|
|
|
/* Define to the OpenSSL API version in use. This avoids deprecation warnings
|
|
|
|
from newer OpenSSL versions. */
|
|
|
|
#undef OPENSSL_API_COMPAT
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to the address where bug reports for this package should be sent. */
|
|
|
|
#undef PACKAGE_BUGREPORT
|
2001-02-27 09:13:31 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to the full name of this package. */
|
|
|
|
#undef PACKAGE_NAME
|
2000-11-20 16:56:14 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to the full name and version of this package. */
|
|
|
|
#undef PACKAGE_STRING
|
2003-03-06 04:16:55 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to the one symbol short name of this package. */
|
|
|
|
#undef PACKAGE_TARNAME
|
2003-03-06 04:16:55 +01:00
|
|
|
|
2013-12-19 02:53:23 +01:00
|
|
|
/* Define to the home page for this package. */
|
|
|
|
#undef PACKAGE_URL
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to the version of this package. */
|
|
|
|
#undef PACKAGE_VERSION
|
2001-12-03 18:44:52 +01:00
|
|
|
|
Add, optional, support for 128bit integers.
We will, for the foreseeable future, not expose 128 bit datatypes to
SQL. But being able to use 128bit math will allow us, in a later patch,
to use 128bit accumulators for some aggregates; leading to noticeable
speedups over using numeric.
So far we only detect a gcc/clang extension that supports 128bit math,
but no 128bit literals, and no *printf support. We might want to expand
this in the future to further compilers; if there are any that that
provide similar support.
Discussion: 544BB5F1.50709@proxel.se
Author: Andreas Karlsson, with significant editorializing by me
Reviewed-By: Peter Geoghegan, Oskari Saarenmaa
2015-03-20 10:26:17 +01:00
|
|
|
/* Define to the name of a signed 128-bit integer type. */
|
|
|
|
#undef PG_INT128_TYPE
|
|
|
|
|
2012-10-08 03:52:07 +02:00
|
|
|
/* Define to the name of a signed 64-bit integer type. */
|
|
|
|
#undef PG_INT64_TYPE
|
|
|
|
|
2014-01-23 23:18:23 +01:00
|
|
|
/* Define to the name of the default PostgreSQL service principal in Kerberos
|
|
|
|
(GSSAPI). (--with-krb-srvnam=NAME) */
|
2003-04-07 00:45:23 +02:00
|
|
|
#undef PG_KRB_SRVNAM
|
2002-05-05 02:03:29 +02:00
|
|
|
|
2008-12-11 08:34:09 +01:00
|
|
|
/* PostgreSQL major version as a string */
|
|
|
|
#undef PG_MAJORVERSION
|
|
|
|
|
2020-03-10 11:20:38 +01:00
|
|
|
/* PostgreSQL major version number */
|
|
|
|
#undef PG_MAJORVERSION_NUM
|
|
|
|
|
|
|
|
/* PostgreSQL minor version number */
|
|
|
|
#undef PG_MINORVERSION_NUM
|
|
|
|
|
2018-10-09 17:10:07 +02:00
|
|
|
/* Define to best printf format archetype, usually gnu_printf if available. */
|
2018-08-13 00:46:01 +02:00
|
|
|
#undef PG_PRINTF_ATTRIBUTE
|
2014-11-23 15:34:03 +01:00
|
|
|
|
Fix ecpglib.h to declare bool consistently with c.h.
This completes the task begun in commit 1408d5d86, to synchronize
ECPG's exported definitions with the definition of bool used by
c.h (and, therefore, the one actually in use in the ECPG library).
On practically all modern platforms, ecpglib.h will now just
include <stdbool.h>, which should surprise nobody anymore.
That removes a header-inclusion-order hazard for ECPG clients,
who previously might get build failures or unexpected behavior
depending on whether they'd included <stdbool.h> themselves,
and if so, whether before or after ecpglib.h.
On platforms where sizeof(_Bool) is not 1 (only old PPC-based
Mac systems, as far as I know), things are still messy, as
inclusion of <stdbool.h> could still break ECPG client code.
There doesn't seem to be any clean fix for that, and given the
probably-negligible population of users who would care anymore,
it's not clear we should go far out of our way to cope with it.
This change at least fixes some header-inclusion-order hazards
for our own code, since c.h and ecpglib.h previously disagreed
on whether bool should be char or unsigned char.
To implement this with minimal invasion of ECPG client namespace,
move the choice of whether to rely on <stdbool.h> into configure,
and have it export a configuration symbol PG_USE_STDBOOL.
ecpglib.h no longer exports definitions for TRUE and FALSE,
only their lowercase brethren. We could undo that if we get
push-back about it.
Ideally we'd back-patch this as far as v11, which is where c.h
started to rely on <stdbool.h>. But the odds of creating problems
for formerly-working ECPG client code seem about as large as the
odds of fixing any non-working cases, so we'll just do this in HEAD.
Discussion: https://postgr.es/m/CAA4eK1LmaKO7Du9M9Lo=kxGU8sB6aL8fa3sF6z6d5yYYVe3BuQ@mail.gmail.com
2019-11-12 19:00:04 +01:00
|
|
|
/* Define to 1 to use <stdbool.h> to define type bool. */
|
|
|
|
#undef PG_USE_STDBOOL
|
|
|
|
|
2006-02-28 17:41:21 +01:00
|
|
|
/* PostgreSQL version as a string */
|
2003-04-07 00:45:23 +02:00
|
|
|
#undef PG_VERSION
|
2002-05-05 02:03:29 +02:00
|
|
|
|
2006-02-28 17:41:21 +01:00
|
|
|
/* PostgreSQL version as a number */
|
|
|
|
#undef PG_VERSION_NUM
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* A string containing the version number, platform, and C compiler */
|
|
|
|
#undef PG_VERSION_STR
|
2002-05-05 02:03:29 +02:00
|
|
|
|
2007-09-21 04:33:46 +02:00
|
|
|
/* Define to 1 to allow profiling output to be saved separately for each
|
|
|
|
process. */
|
2007-02-21 16:12:39 +01:00
|
|
|
#undef PROFILE_PID_DIR
|
|
|
|
|
2015-08-13 13:35:02 +02:00
|
|
|
/* Define to necessary symbol if this constant uses a non-standard name on
|
|
|
|
your system. */
|
|
|
|
#undef PTHREAD_CREATE_JOINABLE
|
|
|
|
|
2008-05-02 03:08:27 +02:00
|
|
|
/* RELSEG_SIZE is the maximum number of blocks allowed in one disk file. Thus,
|
|
|
|
the maximum size of a single file is RELSEG_SIZE * BLCKSZ; relations bigger
|
|
|
|
than that are divided into multiple files. RELSEG_SIZE * BLCKSZ must be
|
|
|
|
less than your OS' limit on file size. This is often 2 GB or 4GB in a
|
|
|
|
32-bit operating system, unless you have large file support enabled. By
|
|
|
|
default, we make the limit 1 GB to avoid any possible integer-overflow
|
|
|
|
problems within the OS. A limit smaller than necessary only means we divide
|
|
|
|
a large relation into more chunks than necessary, so it seems best to err
|
|
|
|
in the direction of a small limit. A power-of-2 value is recommended to
|
|
|
|
save a few cycles in md.c, but is not absolutely required. Changing
|
|
|
|
RELSEG_SIZE requires an initdb. */
|
|
|
|
#undef RELSEG_SIZE
|
|
|
|
|
2018-03-21 12:43:29 +01:00
|
|
|
/* The size of `bool', as computed by sizeof. */
|
|
|
|
#undef SIZEOF_BOOL
|
|
|
|
|
2009-12-31 20:41:37 +01:00
|
|
|
/* The size of `long', as computed by sizeof. */
|
|
|
|
#undef SIZEOF_LONG
|
|
|
|
|
2008-03-10 21:06:27 +01:00
|
|
|
/* The size of `off_t', as computed by sizeof. */
|
|
|
|
#undef SIZEOF_OFF_T
|
|
|
|
|
2008-02-17 17:36:43 +01:00
|
|
|
/* The size of `size_t', as computed by sizeof. */
|
2005-08-21 01:26:37 +02:00
|
|
|
#undef SIZEOF_SIZE_T
|
|
|
|
|
2009-01-06 16:38:44 +01:00
|
|
|
/* The size of `void *', as computed by sizeof. */
|
|
|
|
#undef SIZEOF_VOID_P
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 if you have the ANSI C header files. */
|
|
|
|
#undef STDC_HEADERS
|
2000-08-29 11:36:51 +02:00
|
|
|
|
2018-09-27 00:23:13 +02:00
|
|
|
/* Define to 1 if strerror_r() returns int. */
|
2004-06-08 00:39:45 +02:00
|
|
|
#undef STRERROR_R_INT
|
|
|
|
|
Use ARMv8 CRC instructions where available.
ARMv8 introduced special CPU instructions for calculating CRC-32C. Use
them, when available, for speed.
Like with the similar Intel CRC instructions, several factors affect
whether the instructions can be used. The compiler intrinsics for them must
be supported by the compiler, and the instructions must be supported by the
target architecture. If the compilation target architecture does not
support the instructions, but adding "-march=armv8-a+crc" makes them
available, then we compile the code with a runtime check to determine if
the host we're running on supports them or not.
For the runtime check, use glibc getauxval() function. Unfortunately,
that's not very portable, but I couldn't find any more portable way to do
it. If getauxval() is not available, the CRC instructions will still be
used if the target architecture supports them without any additional
compiler flags, but the runtime check will not be available.
Original patch by Yuqi Gu, heavily modified by me. Reviewed by Andres
Freund, Thomas Munro.
Discussion: https://www.postgresql.org/message-id/HE1PR0801MB1323D171938EABC04FFE7FA9E3110%40HE1PR0801MB1323.eurprd08.prod.outlook.com
2018-04-04 11:22:45 +02:00
|
|
|
/* Define to 1 to use ARMv8 CRC Extension. */
|
|
|
|
#undef USE_ARMV8_CRC32C
|
|
|
|
|
|
|
|
/* Define to 1 to use ARMv8 CRC Extension with a runtime check. */
|
|
|
|
#undef USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 to build with assertion checks. (--enable-cassert) */
|
|
|
|
#undef USE_ASSERT_CHECKING
|
2002-11-07 23:08:30 +01:00
|
|
|
|
2005-06-04 22:42:43 +02:00
|
|
|
/* Define to 1 to build with Bonjour support. (--with-bonjour) */
|
|
|
|
#undef USE_BONJOUR
|
|
|
|
|
2016-04-08 19:51:54 +02:00
|
|
|
/* Define to 1 to build with BSD Authentication support. (--with-bsd-auth) */
|
|
|
|
#undef USE_BSD_AUTH
|
|
|
|
|
2017-03-23 20:25:34 +01:00
|
|
|
/* Define to build with ICU support. (--with-icu) */
|
|
|
|
#undef USE_ICU
|
|
|
|
|
2006-03-06 18:41:44 +01:00
|
|
|
/* Define to 1 to build with LDAP support. (--with-ldap) */
|
|
|
|
#undef USE_LDAP
|
|
|
|
|
2006-12-21 17:05:16 +01:00
|
|
|
/* Define to 1 to build with XML support. (--with-libxml) */
|
|
|
|
#undef USE_LIBXML
|
|
|
|
|
2008-01-24 07:23:33 +01:00
|
|
|
/* Define to 1 to use XSLT support when building contrib/xml2.
|
2007-11-05 18:43:20 +01:00
|
|
|
(--with-libxslt) */
|
2007-05-04 17:20:52 +02:00
|
|
|
#undef USE_LIBXSLT
|
|
|
|
|
2018-03-21 01:26:25 +01:00
|
|
|
/* Define to 1 to build with LLVM based JIT support. (--with-llvm) */
|
|
|
|
#undef USE_LLVM
|
|
|
|
|
2021-03-21 22:20:17 +01:00
|
|
|
/* Define to 1 to build with LZ4 support. (--with-lz4) */
|
Allow configurable LZ4 TOAST compression.
There is now a per-column COMPRESSION option which can be set to pglz
(the default, and the only option in up until now) or lz4. Or, if you
like, you can set the new default_toast_compression GUC to lz4, and
then that will be the default for new table columns for which no value
is specified. We don't have lz4 support in the PostgreSQL code, so
to use lz4 compression, PostgreSQL must be built --with-lz4.
In general, TOAST compression means compression of individual column
values, not the whole tuple, and those values can either be compressed
inline within the tuple or compressed and then stored externally in
the TOAST table, so those properties also apply to this feature.
Prior to this commit, a TOAST pointer has two unused bits as part of
the va_extsize field, and a compessed datum has two unused bits as
part of the va_rawsize field. These bits are unused because the length
of a varlena is limited to 1GB; we now use them to indicate the
compression type that was used. This means we only have bit space for
2 more built-in compresison types, but we could work around that
problem, if necessary, by introducing a new vartag_external value for
any further types we end up wanting to add. Hopefully, it won't be
too important to offer a wide selection of algorithms here, since
each one we add not only takes more coding but also adds a build
dependency for every packager. Nevertheless, it seems worth doing
at least this much, because LZ4 gets better compression than PGLZ
with less CPU usage.
It's possible for LZ4-compressed datums to leak into composite type
values stored on disk, just as it is for PGLZ. It's also possible for
LZ4-compressed attributes to be copied into a different table via SQL
commands such as CREATE TABLE AS or INSERT .. SELECT. It would be
expensive to force such values to be decompressed, so PostgreSQL has
never done so. For the same reasons, we also don't force recompression
of already-compressed values even if the target table prefers a
different compression method than was used for the source data. These
architectural decisions are perhaps arguable but revisiting them is
well beyond the scope of what seemed possible to do as part of this
project. However, it's relatively cheap to recompress as part of
VACUUM FULL or CLUSTER, so this commit adjusts those commands to do
so, if the configured compression method of the table happens not to
match what was used for some column value stored therein.
Dilip Kumar. The original patches on which this work was based were
written by Ildus Kurbangaliev, and those were patches were based on
even earlier work by Nikita Glukhov, but the design has since changed
very substantially, since allow a potentially large number of
compression methods that could be added and dropped on a running
system proved too problematic given some of the architectural issues
mentioned above; the choice of which specific compression method to
add first is now different; and a lot of the code has been heavily
refactored. More recently, Justin Przyby helped quite a bit with
testing and reviewing and this version also includes some code
contributions from him. Other design input and review from Tomas
Vondra, Álvaro Herrera, Andres Freund, Oleg Bartunov, Alexander
Korotkov, and me.
Discussion: http://postgr.es/m/20170907194236.4cefce96%40wp.localdomain
Discussion: http://postgr.es/m/CAFiTN-uUpX3ck%3DK0mLEk-G_kUQY%3DSNOTeqdaNRR9FMdQrHKebw%40mail.gmail.com
2021-03-19 20:10:38 +01:00
|
|
|
#undef USE_LZ4
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to select named POSIX semaphores. */
|
|
|
|
#undef USE_NAMED_POSIX_SEMAPHORES
|
2002-11-07 23:08:30 +01:00
|
|
|
|
2021-02-20 02:17:10 +01:00
|
|
|
/* Define to 1 to build with OpenSSL support. (--with-ssl=openssl) */
|
Break out OpenSSL-specific code to separate files.
This refactoring is in preparation for adding support for other SSL
implementations, with no user-visible effects. There are now two #defines,
USE_OPENSSL which is defined when building with OpenSSL, and USE_SSL which
is defined when building with any SSL implementation. Currently, OpenSSL is
the only implementation so the two #defines go together, but USE_SSL is
supposed to be used for implementation-independent code.
The libpq SSL code is changed to use a custom BIO, which does all the raw
I/O, like we've been doing in the backend for a long time. That makes it
possible to use MSG_NOSIGNAL to block SIGPIPE when using SSL, which avoids
a couple of syscall for each send(). Probably doesn't make much performance
difference in practice - the SSL encryption is expensive enough to mask the
effect - but it was a natural result of this refactoring.
Based on a patch by Martijn van Oosterhout from 2006. Briefly reviewed by
Alvaro Herrera, Andreas Karlsson, Jeff Janes.
2014-08-11 10:54:19 +02:00
|
|
|
#undef USE_OPENSSL
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 to build with PAM support. (--with-pam) */
|
|
|
|
#undef USE_PAM
|
2002-11-07 23:08:30 +01:00
|
|
|
|
2018-04-04 10:20:53 +02:00
|
|
|
/* Define to 1 to use software CRC-32C implementation (slicing-by-8). */
|
Use Intel SSE 4.2 CRC instructions where available.
Modern x86 and x86-64 processors with SSE 4.2 support have special
instructions, crc32b and crc32q, for calculating CRC-32C. They greatly
speed up CRC calculation.
Whether the instructions can be used or not depends on the compiler and the
target architecture. If generation of SSE 4.2 instructions is allowed for
the target (-msse4.2 flag on gcc and clang), use them. If they are not
allowed by default, but the compiler supports the -msse4.2 flag to enable
them, compile just the CRC-32C function with -msse4.2 flag, and check at
runtime whether the processor we're running on supports it. If it doesn't,
fall back to the slicing-by-8 algorithm. (With the common defaults on
current operating systems, the runtime-check variant is what you get in
practice.)
Abhijit Menon-Sen, heavily modified by me, reviewed by Andres Freund.
2015-04-14 16:05:03 +02:00
|
|
|
#undef USE_SLICING_BY_8_CRC32C
|
|
|
|
|
|
|
|
/* Define to 1 use Intel SSE 4.2 CRC instructions. */
|
|
|
|
#undef USE_SSE42_CRC32C
|
|
|
|
|
2018-04-04 10:20:53 +02:00
|
|
|
/* Define to 1 to use Intel SSE 4.2 CRC instructions with a runtime check. */
|
Use Intel SSE 4.2 CRC instructions where available.
Modern x86 and x86-64 processors with SSE 4.2 support have special
instructions, crc32b and crc32q, for calculating CRC-32C. They greatly
speed up CRC calculation.
Whether the instructions can be used or not depends on the compiler and the
target architecture. If generation of SSE 4.2 instructions is allowed for
the target (-msse4.2 flag on gcc and clang), use them. If they are not
allowed by default, but the compiler supports the -msse4.2 flag to enable
them, compile just the CRC-32C function with -msse4.2 flag, and check at
runtime whether the processor we're running on supports it. If it doesn't,
fall back to the slicing-by-8 algorithm. (With the common defaults on
current operating systems, the runtime-check variant is what you get in
practice.)
Abhijit Menon-Sen, heavily modified by me, reviewed by Andres Freund.
2015-04-14 16:05:03 +02:00
|
|
|
#undef USE_SSE42_CRC32C_WITH_RUNTIME_CHECK
|
|
|
|
|
2015-11-17 12:46:17 +01:00
|
|
|
/* Define to build with systemd support. (--with-systemd) */
|
|
|
|
#undef USE_SYSTEMD
|
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to select SysV-style semaphores. */
|
|
|
|
#undef USE_SYSV_SEMAPHORES
|
2002-11-07 23:08:30 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to select SysV-style shared memory. */
|
|
|
|
#undef USE_SYSV_SHARED_MEMORY
|
2002-11-07 23:08:30 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to select unnamed POSIX semaphores. */
|
|
|
|
#undef USE_UNNAMED_POSIX_SEMAPHORES
|
2002-11-07 23:08:30 +01:00
|
|
|
|
2006-04-29 22:47:31 +02:00
|
|
|
/* Define to select Win32-style semaphores. */
|
|
|
|
#undef USE_WIN32_SEMAPHORES
|
|
|
|
|
2007-03-26 04:38:22 +02:00
|
|
|
/* Define to select Win32-style shared memory. */
|
|
|
|
#undef USE_WIN32_SHARED_MEMORY
|
|
|
|
|
Cope if platform declares mbstowcs_l(), but not locale_t, in <xlocale.h>.
Previously, we included <xlocale.h> only if necessary to get the definition
of type locale_t. According to notes in PGAC_TYPE_LOCALE_T, this is
important because on some versions of glibc that file supplies an
incompatible declaration of locale_t. (This info may be obsolete, because
on my RHEL6 box that seems to be the *only* definition of locale_t; but
there may still be glibc's in the wild for which it's a live concern.)
It turns out though that on FreeBSD and maybe other BSDen, you can get
locale_t from stdlib.h or locale.h but mbstowcs_l() and friends only from
<xlocale.h>. This was leaving us compiling calls to mbstowcs_l() and
friends with no visible prototype, which causes a warning and could
possibly cause actual trouble, since it's not declared to return int.
Hence, adjust the configure checks so that we'll include <xlocale.h>
either if it's necessary to get type locale_t or if it's necessary to
get a declaration of mbstowcs_l().
Report and patch by Aleksander Alekseev, somewhat whacked around by me.
Back-patch to all supported branches, since we have been using
mbstowcs_l() since 9.1.
2016-03-15 18:19:57 +01:00
|
|
|
/* Define to 1 if `wcstombs_l' requires <xlocale.h>. */
|
|
|
|
#undef WCSTOMBS_L_IN_XLOCALE
|
|
|
|
|
2009-07-02 20:55:40 +02:00
|
|
|
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
|
|
|
significant byte first (like Motorola and SPARC, unlike Intel). */
|
|
|
|
#if defined AC_APPLE_UNIVERSAL_BUILD
|
|
|
|
# if defined __BIG_ENDIAN__
|
|
|
|
# define WORDS_BIGENDIAN 1
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# ifndef WORDS_BIGENDIAN
|
|
|
|
# undef WORDS_BIGENDIAN
|
|
|
|
# endif
|
|
|
|
#endif
|
2007-04-06 06:21:44 +02:00
|
|
|
|
2008-05-02 21:52:37 +02:00
|
|
|
/* Size of a WAL file block. This need have no particular relation to BLCKSZ.
|
|
|
|
XLOG_BLCKSZ must be a power of 2, and if your system supports O_DIRECT I/O,
|
|
|
|
XLOG_BLCKSZ must be a multiple of the alignment requirement for direct-I/O
|
|
|
|
buffers, else direct I/O may fail. Changing XLOG_BLCKSZ requires an initdb.
|
|
|
|
*/
|
|
|
|
#undef XLOG_BLCKSZ
|
|
|
|
|
2013-12-29 18:57:45 +01:00
|
|
|
|
2013-12-19 02:53:23 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Number of bits in a file offset, on hosts where this is settable. */
|
|
|
|
#undef _FILE_OFFSET_BITS
|
2002-11-07 23:08:30 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
|
|
|
|
#undef _LARGEFILE_SOURCE
|
2002-11-07 23:08:30 +01:00
|
|
|
|
2003-04-07 00:45:23 +02:00
|
|
|
/* Define for large files, on AIX-style hosts. */
|
|
|
|
#undef _LARGE_FILES
|
|
|
|
|
2008-02-17 17:36:43 +01:00
|
|
|
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
|
|
|
calls it, or to nothing if 'inline' is not supported under any name. */
|
|
|
|
#ifndef __cplusplus
|
2003-04-07 00:45:23 +02:00
|
|
|
#undef inline
|
2008-02-17 17:36:43 +01:00
|
|
|
#endif
|
2000-08-29 11:36:51 +02:00
|
|
|
|
2017-10-13 00:25:38 +02:00
|
|
|
/* Define to keyword to use for C99 restrict support, or to nothing if not
|
|
|
|
supported */
|
|
|
|
#undef pg_restrict
|
|
|
|
|
2017-10-12 01:01:52 +02:00
|
|
|
/* Define to the equivalent of the C99 'restrict' keyword, or to
|
|
|
|
nothing if this is not supported. Do not define if restrict is
|
|
|
|
supported directly. */
|
|
|
|
#undef restrict
|
|
|
|
/* Work around a bug in Sun C++: it does not support _Restrict or
|
|
|
|
__restrict__, even though the corresponding Sun C compiler ends up with
|
|
|
|
"#define restrict _Restrict" or "#define restrict __restrict__" in the
|
|
|
|
previous line. Perhaps some future version of Sun C++ will work with
|
|
|
|
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
|
|
|
|
#if defined __SUNPRO_CC && !defined __RESTRICT
|
|
|
|
# define _Restrict
|
|
|
|
# define __restrict__
|
|
|
|
#endif
|
|
|
|
|
2017-03-09 21:18:59 +01:00
|
|
|
/* Define to how the compiler spells `typeof'. */
|
|
|
|
#undef typeof
|