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

Commit 6455df0

Browse files
author
Aleksandr Parfenov
committed
Merge branch 'master' into pgpro-1103-flexible-fts
2 parents d52072b + a2a2205 commit 6455df0

File tree

1,836 files changed

+23704
-10018
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,836 files changed

+23704
-10018
lines changed

COPYRIGHT

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PostgreSQL Database Management System
22
(formerly known as Postgres, then as Postgres95)
33

4-
Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
4+
Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
55

66
Portions Copyright (c) 1994, The Regents of the University of California
77

config/c-compiler.m4

+40-8
Original file line numberDiff line numberDiff line change
@@ -108,29 +108,61 @@ AC_DEFUN([PGAC_TYPE_128BIT_INT],
108108
[AC_CACHE_CHECK([for __int128], [pgac_cv__128bit_int],
109109
[AC_LINK_IFELSE([AC_LANG_PROGRAM([
110110
/*
111+
* We don't actually run this test, just link it to verify that any support
112+
* functions needed for __int128 are present.
113+
*
111114
* These are globals to discourage the compiler from folding all the
112115
* arithmetic tests down to compile-time constants. We do not have
113-
* convenient support for 64bit literals at this point...
116+
* convenient support for 128bit literals at this point...
114117
*/
115118
__int128 a = 48828125;
116-
__int128 b = 97656255;
119+
__int128 b = 97656250;
117120
],[
118121
__int128 c,d;
119122
a = (a << 12) + 1; /* 200000000001 */
120123
b = (b << 12) + 5; /* 400000000005 */
121-
/* use the most relevant arithmetic ops */
124+
/* try the most relevant arithmetic ops */
122125
c = a * b;
123126
d = (c + b) / b;
124-
/* return different values, to prevent optimizations */
127+
/* must use the results, else compiler may optimize arithmetic away */
125128
if (d != a+1)
126-
return 0;
127-
return 1;
129+
return 1;
128130
])],
129131
[pgac_cv__128bit_int=yes],
130132
[pgac_cv__128bit_int=no])])
131133
if test x"$pgac_cv__128bit_int" = xyes ; then
132-
AC_DEFINE(PG_INT128_TYPE, __int128, [Define to the name of a signed 128-bit integer type.])
133-
AC_CHECK_ALIGNOF(PG_INT128_TYPE)
134+
# Use of non-default alignment with __int128 tickles bugs in some compilers.
135+
# If not cross-compiling, we can test for bugs and disable use of __int128
136+
# with buggy compilers. If cross-compiling, hope for the best.
137+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
138+
AC_CACHE_CHECK([for __int128 alignment bug], [pgac_cv__128bit_int_bug],
139+
[AC_RUN_IFELSE([AC_LANG_PROGRAM([
140+
/* This must match the corresponding code in c.h: */
141+
#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
142+
#define pg_attribute_aligned(a) __attribute__((aligned(a)))
143+
#endif
144+
typedef __int128 int128a
145+
#if defined(pg_attribute_aligned)
146+
pg_attribute_aligned(8)
147+
#endif
148+
;
149+
int128a holder;
150+
void pass_by_val(void *buffer, int128a par) { holder = par; }
151+
],[
152+
long int i64 = 97656225L << 12;
153+
int128a q;
154+
pass_by_val(main, (int128a) i64);
155+
q = (int128a) i64;
156+
if (q != holder)
157+
return 1;
158+
])],
159+
[pgac_cv__128bit_int_bug=ok],
160+
[pgac_cv__128bit_int_bug=broken],
161+
[pgac_cv__128bit_int_bug="assuming ok"])])
162+
if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
163+
AC_DEFINE(PG_INT128_TYPE, __int128, [Define to the name of a signed 128-bit integer type.])
164+
AC_CHECK_ALIGNOF(PG_INT128_TYPE)
165+
fi
134166
fi])# PGAC_TYPE_128BIT_INT
135167

136168

configure

+83-13
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# This configure script is free software; the Free Software Foundation
1212
# gives unlimited permission to copy, distribute and modify it.
1313
#
14-
# Copyright (c) 1996-2017, PostgreSQL Global Development Group
14+
# Copyright (c) 1996-2018, PostgreSQL Global Development Group
1515
## -------------------- ##
1616
## M4sh Initialization. ##
1717
## -------------------- ##
@@ -1635,7 +1635,7 @@ Copyright (C) 2012 Free Software Foundation, Inc.
16351635
This configure script is free software; the Free Software Foundation
16361636
gives unlimited permission to copy, distribute and modify it.
16371637
1638-
Copyright (c) 1996-2017, PostgreSQL Global Development Group
1638+
Copyright (c) 1996-2018, PostgreSQL Global Development Group
16391639
_ACEOF
16401640
exit
16411641
fi
@@ -10125,12 +10125,13 @@ else
1012510125
fi
1012610126

1012710127
fi
10128-
for ac_func in SSL_get_current_compression
10128+
for ac_func in SSL_get_current_compression X509_get_signature_nid
1012910129
do :
10130-
ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
10131-
if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
10130+
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10131+
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10132+
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
1013210133
cat >>confdefs.h <<_ACEOF
10133-
#define HAVE_SSL_GET_CURRENT_COMPRESSION 1
10134+
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
1013410135
_ACEOF
1013510136

1013610137
fi
@@ -10424,6 +10425,17 @@ fi
1042410425
else
1042510426
LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
1042610427
fi
10428+
for ac_func in ldap_initialize
10429+
do :
10430+
ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
10431+
if test "x$ac_cv_func_ldap_initialize" = xyes; then :
10432+
cat >>confdefs.h <<_ACEOF
10433+
#define HAVE_LDAP_INITIALIZE 1
10434+
_ACEOF
10435+
10436+
fi
10437+
done
10438+
1042710439
else
1042810440
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
1042910441
$as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
@@ -14984,12 +14996,15 @@ else
1498414996
/* end confdefs.h. */
1498514997
1498614998
/*
14999+
* We don't actually run this test, just link it to verify that any support
15000+
* functions needed for __int128 are present.
15001+
*
1498715002
* These are globals to discourage the compiler from folding all the
1498815003
* arithmetic tests down to compile-time constants. We do not have
14989-
* convenient support for 64bit literals at this point...
15004+
* convenient support for 128bit literals at this point...
1499015005
*/
1499115006
__int128 a = 48828125;
14992-
__int128 b = 97656255;
15007+
__int128 b = 97656250;
1499315008
1499415009
int
1499515010
main ()
@@ -14998,13 +15013,12 @@ main ()
1499815013
__int128 c,d;
1499915014
a = (a << 12) + 1; /* 200000000001 */
1500015015
b = (b << 12) + 5; /* 400000000005 */
15001-
/* use the most relevant arithmetic ops */
15016+
/* try the most relevant arithmetic ops */
1500215017
c = a * b;
1500315018
d = (c + b) / b;
15004-
/* return different values, to prevent optimizations */
15019+
/* must use the results, else compiler may optimize arithmetic away */
1500515020
if (d != a+1)
15006-
return 0;
15007-
return 1;
15021+
return 1;
1500815022
1500915023
;
1501015024
return 0;
@@ -15021,10 +15035,65 @@ fi
1502115035
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
1502215036
$as_echo "$pgac_cv__128bit_int" >&6; }
1502315037
if test x"$pgac_cv__128bit_int" = xyes ; then
15038+
# Use of non-default alignment with __int128 tickles bugs in some compilers.
15039+
# If not cross-compiling, we can test for bugs and disable use of __int128
15040+
# with buggy compilers. If cross-compiling, hope for the best.
15041+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
15042+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
15043+
$as_echo_n "checking for __int128 alignment bug... " >&6; }
15044+
if ${pgac_cv__128bit_int_bug+:} false; then :
15045+
$as_echo_n "(cached) " >&6
15046+
else
15047+
if test "$cross_compiling" = yes; then :
15048+
pgac_cv__128bit_int_bug="assuming ok"
15049+
else
15050+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15051+
/* end confdefs.h. */
15052+
15053+
/* This must match the corresponding code in c.h: */
15054+
#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
15055+
#define pg_attribute_aligned(a) __attribute__((aligned(a)))
15056+
#endif
15057+
typedef __int128 int128a
15058+
#if defined(pg_attribute_aligned)
15059+
pg_attribute_aligned(8)
15060+
#endif
15061+
;
15062+
int128a holder;
15063+
void pass_by_val(void *buffer, int128a par) { holder = par; }
15064+
15065+
int
15066+
main ()
15067+
{
15068+
15069+
long int i64 = 97656225L << 12;
15070+
int128a q;
15071+
pass_by_val(main, (int128a) i64);
15072+
q = (int128a) i64;
15073+
if (q != holder)
15074+
return 1;
15075+
15076+
;
15077+
return 0;
15078+
}
15079+
_ACEOF
15080+
if ac_fn_c_try_run "$LINENO"; then :
15081+
pgac_cv__128bit_int_bug=ok
15082+
else
15083+
pgac_cv__128bit_int_bug=broken
15084+
fi
15085+
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15086+
conftest.$ac_objext conftest.beam conftest.$ac_ext
15087+
fi
15088+
15089+
fi
15090+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
15091+
$as_echo "$pgac_cv__128bit_int_bug" >&6; }
15092+
if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
1502415093

1502515094
$as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
1502615095

15027-
# The cast to long int works around a bug in the HP C Compiler,
15096+
# The cast to long int works around a bug in the HP C Compiler,
1502815097
# see AC_CHECK_SIZEOF for more information.
1502915098
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
1503015099
$as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
@@ -15059,6 +15128,7 @@ cat >>confdefs.h <<_ACEOF
1505915128
_ACEOF
1506015129

1506115130

15131+
fi
1506215132
fi
1506315133

1506415134
# Check for various atomic operations now that we have checked how to declare

configure.in

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.6
2323
Untested combinations of 'autoconf' and PostgreSQL versions are not
2424
recommended. You can remove the check from 'configure.in' but it is then
2525
your responsibility whether the result works or not.])])
26-
AC_COPYRIGHT([Copyright (c) 1996-2017, PostgreSQL Global Development Group])
26+
AC_COPYRIGHT([Copyright (c) 1996-2018, PostgreSQL Global Development Group])
2727
AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
2828
AC_CONFIG_AUX_DIR(config)
2929
AC_PREFIX_DEFAULT(/usr/local/pgsql)
@@ -1064,7 +1064,7 @@ if test "$with_openssl" = yes ; then
10641064
AC_SEARCH_LIBS(CRYPTO_new_ex_data, [eay32 crypto], [], [AC_MSG_ERROR([library 'eay32' or 'crypto' is required for OpenSSL])])
10651065
AC_SEARCH_LIBS(SSL_new, [ssleay32 ssl], [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])])
10661066
fi
1067-
AC_CHECK_FUNCS([SSL_get_current_compression])
1067+
AC_CHECK_FUNCS([SSL_get_current_compression X509_get_signature_nid])
10681068
# Functions introduced in OpenSSL 1.1.0. We used to check for
10691069
# OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
10701070
# defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
@@ -1106,6 +1106,7 @@ if test "$with_ldap" = yes ; then
11061106
else
11071107
LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
11081108
fi
1109+
AC_CHECK_FUNCS([ldap_initialize])
11091110
else
11101111
AC_CHECK_LIB(wldap32, ldap_bind, [], [AC_MSG_ERROR([library 'wldap32' is required for LDAP])])
11111112
LDAP_LIBS_FE="-lwldap32"

contrib/adminpack/adminpack.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* adminpack.c
44
*
55
*
6-
* Copyright (c) 2002-2017, PostgreSQL Global Development Group
6+
* Copyright (c) 2002-2018, PostgreSQL Global Development Group
77
*
88
* Author: Andreas Pflug <pgadmin@pse-consulting.de>
99
*

contrib/amcheck/verify_nbtree.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* verification).
1010
*
1111
*
12-
* Copyright (c) 2017, PostgreSQL Global Development Group
12+
* Copyright (c) 2017-2018, PostgreSQL Global Development Group
1313
*
1414
* IDENTIFICATION
1515
* contrib/amcheck/verify_nbtree.c

contrib/auth_delay/auth_delay.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*
33
* auth_delay.c
44
*
5-
* Copyright (c) 2010-2017, PostgreSQL Global Development Group
5+
* Copyright (c) 2010-2018, PostgreSQL Global Development Group
66
*
77
* IDENTIFICATION
88
* contrib/auth_delay/auth_delay.c

contrib/auto_explain/auto_explain.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* auto_explain.c
44
*
55
*
6-
* Copyright (c) 2008-2017, PostgreSQL Global Development Group
6+
* Copyright (c) 2008-2018, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
99
* contrib/auto_explain/auto_explain.c

contrib/bloom/blcost.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* blcost.c
44
* Cost estimate function for bloom indexes.
55
*
6-
* Copyright (c) 2016-2017, PostgreSQL Global Development Group
6+
* Copyright (c) 2016-2018, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
99
* contrib/bloom/blcost.c

contrib/bloom/blinsert.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* blinsert.c
44
* Bloom index build and insert functions.
55
*
6-
* Copyright (c) 2016-2017, PostgreSQL Global Development Group
6+
* Copyright (c) 2016-2018, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
99
* contrib/bloom/blinsert.c

contrib/bloom/bloom.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* bloom.h
44
* Header for bloom index.
55
*
6-
* Copyright (c) 2016-2017, PostgreSQL Global Development Group
6+
* Copyright (c) 2016-2018, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
99
* contrib/bloom/bloom.h

contrib/bloom/blscan.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* blscan.c
44
* Bloom index scan functions.
55
*
6-
* Copyright (c) 2016-2017, PostgreSQL Global Development Group
6+
* Copyright (c) 2016-2018, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
99
* contrib/bloom/blscan.c

contrib/bloom/blutils.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* blutils.c
44
* Bloom index utilities.
55
*
6-
* Portions Copyright (c) 2016-2017, PostgreSQL Global Development Group
6+
* Portions Copyright (c) 2016-2018, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1990-1993, Regents of the University of California
88
*
99
* IDENTIFICATION

contrib/bloom/blvacuum.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* blvacuum.c
44
* Bloom VACUUM functions.
55
*
6-
* Copyright (c) 2016-2017, PostgreSQL Global Development Group
6+
* Copyright (c) 2016-2018, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
99
* contrib/bloom/blvacuum.c

contrib/bloom/blvalidate.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* blvalidate.c
44
* Opclass validator for bloom.
55
*
6-
* Copyright (c) 2016-2017, PostgreSQL Global Development Group
6+
* Copyright (c) 2016-2018, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
99
* contrib/bloom/blvalidate.c

0 commit comments

Comments
 (0)