Skip to content

Commit 6657d85

Browse files
committed
merge with 9.6-master
2 parents 9bb21ef + 0e9e64c commit 6657d85

File tree

1,291 files changed

+86096
-68944
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,291 files changed

+86096
-68944
lines changed

configure

Lines changed: 62 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for PostgreSQL 9.6beta1.
3+
# Generated by GNU Autoconf 2.69 for PostgreSQL 9.6.0.
44
#
55
# Report bugs to <pgsql-bugs@postgresql.org>.
66
#
@@ -582,8 +582,8 @@ MAKEFLAGS=
582582
# Identity of this package.
583583
PACKAGE_NAME='PostgreSQL'
584584
PACKAGE_TARNAME='postgresql'
585-
PACKAGE_VERSION='9.6beta1'
586-
PACKAGE_STRING='PostgreSQL 9.6beta1'
585+
PACKAGE_VERSION='9.6.0'
586+
PACKAGE_STRING='PostgreSQL 9.6.0'
587587
PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
588588
PACKAGE_URL=''
589589

@@ -1398,7 +1398,7 @@ if test "$ac_init_help" = "long"; then
13981398
# Omit some internal or obsolete options to make the list less imposing.
13991399
# This message is too long to be a string in the A/UX 3.1 sh.
14001400
cat <<_ACEOF
1401-
\`configure' configures PostgreSQL 9.6beta1 to adapt to many kinds of systems.
1401+
\`configure' configures PostgreSQL 9.6.0 to adapt to many kinds of systems.
14021402
14031403
Usage: $0 [OPTION]... [VAR=VALUE]...
14041404
@@ -1463,7 +1463,7 @@ fi
14631463

14641464
if test -n "$ac_init_help"; then
14651465
case $ac_init_help in
1466-
short | recursive ) echo "Configuration of PostgreSQL 9.6beta1:";;
1466+
short | recursive ) echo "Configuration of PostgreSQL 9.6.0:";;
14671467
esac
14681468
cat <<\_ACEOF
14691469
@@ -1615,7 +1615,7 @@ fi
16151615
test -n "$ac_init_help" && exit $ac_status
16161616
if $ac_init_version; then
16171617
cat <<\_ACEOF
1618-
PostgreSQL configure 9.6beta1
1618+
PostgreSQL configure 9.6.0
16191619
generated by GNU Autoconf 2.69
16201620
16211621
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2326,7 +2326,7 @@ cat >config.log <<_ACEOF
23262326
This file contains any messages produced by compilers while
23272327
running configure, to aid debugging if configure makes a mistake.
23282328
2329-
It was created by PostgreSQL $as_me 9.6beta1, which was
2329+
It was created by PostgreSQL $as_me 9.6.0, which was
23302330
generated by GNU Autoconf 2.69. Invocation command line was
23312331
23322332
$ $0 $@
@@ -9538,9 +9538,9 @@ else
95389538
as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
95399539
fi
95409540

9541-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
9542-
$as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
9543-
if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
9541+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
9542+
$as_echo_n "checking for SSL_new in -lssl... " >&6; }
9543+
if ${ac_cv_lib_ssl_SSL_new+:} false; then :
95449544
$as_echo_n "(cached) " >&6
95459545
else
95469546
ac_check_lib_save_LIBS=$LIBS
@@ -9554,27 +9554,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
95549554
#ifdef __cplusplus
95559555
extern "C"
95569556
#endif
9557-
char SSL_library_init ();
9557+
char SSL_new ();
95589558
int
95599559
main ()
95609560
{
9561-
return SSL_library_init ();
9561+
return SSL_new ();
95629562
;
95639563
return 0;
95649564
}
95659565
_ACEOF
95669566
if ac_fn_c_try_link "$LINENO"; then :
9567-
ac_cv_lib_ssl_SSL_library_init=yes
9567+
ac_cv_lib_ssl_SSL_new=yes
95689568
else
9569-
ac_cv_lib_ssl_SSL_library_init=no
9569+
ac_cv_lib_ssl_SSL_new=no
95709570
fi
95719571
rm -f core conftest.err conftest.$ac_objext \
95729572
conftest$ac_exeext conftest.$ac_ext
95739573
LIBS=$ac_check_lib_save_LIBS
95749574
fi
9575-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
9576-
$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
9577-
if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
9575+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
9576+
$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
9577+
if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
95789578
cat >>confdefs.h <<_ACEOF
95799579
#define HAVE_LIBSSL 1
95809580
_ACEOF
@@ -9644,9 +9644,9 @@ else
96449644
as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
96459645
fi
96469646

9647-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5
9648-
$as_echo_n "checking for library containing SSL_library_init... " >&6; }
9649-
if ${ac_cv_search_SSL_library_init+:} false; then :
9647+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
9648+
$as_echo_n "checking for library containing SSL_new... " >&6; }
9649+
if ${ac_cv_search_SSL_new+:} false; then :
96509650
$as_echo_n "(cached) " >&6
96519651
else
96529652
ac_func_search_save_LIBS=$LIBS
@@ -9659,11 +9659,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
96599659
#ifdef __cplusplus
96609660
extern "C"
96619661
#endif
9662-
char SSL_library_init ();
9662+
char SSL_new ();
96639663
int
96649664
main ()
96659665
{
9666-
return SSL_library_init ();
9666+
return SSL_new ();
96679667
;
96689668
return 0;
96699669
}
@@ -9676,25 +9676,25 @@ for ac_lib in '' ssleay32 ssl; do
96769676
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
96779677
fi
96789678
if ac_fn_c_try_link "$LINENO"; then :
9679-
ac_cv_search_SSL_library_init=$ac_res
9679+
ac_cv_search_SSL_new=$ac_res
96809680
fi
96819681
rm -f core conftest.err conftest.$ac_objext \
96829682
conftest$ac_exeext
9683-
if ${ac_cv_search_SSL_library_init+:} false; then :
9683+
if ${ac_cv_search_SSL_new+:} false; then :
96849684
break
96859685
fi
96869686
done
9687-
if ${ac_cv_search_SSL_library_init+:} false; then :
9687+
if ${ac_cv_search_SSL_new+:} false; then :
96889688

96899689
else
9690-
ac_cv_search_SSL_library_init=no
9690+
ac_cv_search_SSL_new=no
96919691
fi
96929692
rm conftest.$ac_ext
96939693
LIBS=$ac_func_search_save_LIBS
96949694
fi
9695-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5
9696-
$as_echo "$ac_cv_search_SSL_library_init" >&6; }
9697-
ac_res=$ac_cv_search_SSL_library_init
9695+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
9696+
$as_echo "$ac_cv_search_SSL_new" >&6; }
9697+
ac_res=$ac_cv_search_SSL_new
96989698
if test "$ac_res" != no; then :
96999699
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
97009700

@@ -9711,6 +9711,37 @@ if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
97119711
#define HAVE_SSL_GET_CURRENT_COMPRESSION 1
97129712
_ACEOF
97139713

9714+
fi
9715+
done
9716+
9717+
# Functions introduced in OpenSSL 1.1.0. We used to check for
9718+
# OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
9719+
# defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
9720+
# doesn't have these OpenSSL 1.1.0 functions. So check for individual
9721+
# functions.
9722+
for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
9723+
do :
9724+
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9725+
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9726+
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9727+
cat >>confdefs.h <<_ACEOF
9728+
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9729+
_ACEOF
9730+
9731+
fi
9732+
done
9733+
9734+
# OpenSSL versions before 1.1.0 required setting callback functions, for
9735+
# thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
9736+
# function was removed.
9737+
for ac_func in CRYPTO_lock
9738+
do :
9739+
ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
9740+
if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
9741+
cat >>confdefs.h <<_ACEOF
9742+
#define HAVE_CRYPTO_LOCK 1
9743+
_ACEOF
9744+
97149745
fi
97159746
done
97169747

@@ -16433,7 +16464,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1643316464
# report actual input values of CONFIG_FILES etc. instead of their
1643416465
# values after options handling.
1643516466
ac_log="
16436-
This file was extended by PostgreSQL $as_me 9.6beta1, which was
16467+
This file was extended by PostgreSQL $as_me 9.6.0, which was
1643716468
generated by GNU Autoconf 2.69. Invocation command line was
1643816469
1643916470
CONFIG_FILES = $CONFIG_FILES
@@ -16503,7 +16534,7 @@ _ACEOF
1650316534
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1650416535
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1650516536
ac_cs_version="\\
16506-
PostgreSQL config.status 9.6beta1
16537+
PostgreSQL config.status 9.6.0
1650716538
configured by $0, generated by GNU Autoconf 2.69,
1650816539
with options \\"\$ac_cs_config\\"
1650916540

configure.in

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dnl Read the Autoconf manual for details.
1717
dnl
1818
m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
1919

20-
AC_INIT([PostgreSQL], [9.6beta1], [pgsql-bugs@postgresql.org])
20+
AC_INIT([PostgreSQL], [9.6.0], [pgsql-bugs@postgresql.org])
2121

2222
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
2323
Untested combinations of 'autoconf' and PostgreSQL versions are not
@@ -1112,12 +1112,22 @@ if test "$with_openssl" = yes ; then
11121112
dnl Order matters!
11131113
if test "$PORTNAME" != "win32"; then
11141114
AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])])
1115-
AC_CHECK_LIB(ssl, SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])
1115+
AC_CHECK_LIB(ssl, SSL_new, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])
11161116
else
11171117
AC_SEARCH_LIBS(CRYPTO_new_ex_data, eay32 crypto, [], [AC_MSG_ERROR([library 'eay32' or 'crypto' is required for OpenSSL])])
1118-
AC_SEARCH_LIBS(SSL_library_init, ssleay32 ssl, [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])])
1118+
AC_SEARCH_LIBS(SSL_new, ssleay32 ssl, [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])])
11191119
fi
11201120
AC_CHECK_FUNCS([SSL_get_current_compression])
1121+
# Functions introduced in OpenSSL 1.1.0. We used to check for
1122+
# OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
1123+
# defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
1124+
# doesn't have these OpenSSL 1.1.0 functions. So check for individual
1125+
# functions.
1126+
AC_CHECK_FUNCS([OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL])
1127+
# OpenSSL versions before 1.1.0 required setting callback functions, for
1128+
# thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
1129+
# function was removed.
1130+
AC_CHECK_FUNCS([CRYPTO_lock])
11211131
fi
11221132

11231133
if test "$with_pam" = yes ; then

contrib/auto_explain/auto_explain.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,16 @@ _PG_init(void)
165165

166166
DefineCustomRealVariable("auto_explain.sample_rate",
167167
"Fraction of queries to process.",
168-
NULL,
169-
&auto_explain_sample_rate,
170-
1.0,
171-
0.0,
172-
1.0,
173-
PGC_SUSET,
174-
0,
175-
NULL,
176-
NULL,
177-
NULL);
168+
NULL,
169+
&auto_explain_sample_rate,
170+
1.0,
171+
0.0,
172+
1.0,
173+
PGC_SUSET,
174+
0,
175+
NULL,
176+
NULL,
177+
NULL);
178178

179179
EmitWarningsOnPlaceholders("auto_explain");
180180

@@ -209,12 +209,12 @@ static void
209209
explain_ExecutorStart(QueryDesc *queryDesc, int eflags)
210210
{
211211
/*
212-
* For rate sampling, randomly choose top-level statement. Either
213-
* all nested statements will be explained or none will.
212+
* For rate sampling, randomly choose top-level statement. Either all
213+
* nested statements will be explained or none will.
214214
*/
215215
if (auto_explain_log_min_duration >= 0 && nesting_level == 0)
216216
current_query_sampled = (random() < auto_explain_sample_rate *
217-
MAX_RANDOM_VALUE);
217+
MAX_RANDOM_VALUE);
218218

219219
if (auto_explain_enabled() && current_query_sampled)
220220
{

contrib/bloom/blinsert.c

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ PG_MODULE_MAGIC;
3333
typedef struct
3434
{
3535
BloomState blstate; /* bloom index state */
36-
MemoryContext tmpCtx; /* temporary memory context reset after
37-
* each tuple */
36+
MemoryContext tmpCtx; /* temporary memory context reset after each
37+
* tuple */
3838
char data[BLCKSZ]; /* cached page */
3939
int64 count; /* number of tuples in cached page */
40-
} BloomBuildState;
40+
} BloomBuildState;
4141

4242
/*
4343
* Flush page cached in BloomBuildState.
@@ -130,18 +130,16 @@ blbuild(Relation heap, Relation index, IndexInfo *indexInfo)
130130
initBloomState(&buildstate.blstate, index);
131131
buildstate.tmpCtx = AllocSetContextCreate(CurrentMemoryContext,
132132
"Bloom build temporary context",
133-
ALLOCSET_DEFAULT_MINSIZE,
134-
ALLOCSET_DEFAULT_INITSIZE,
135-
ALLOCSET_DEFAULT_MAXSIZE);
133+
ALLOCSET_DEFAULT_SIZES);
136134
initCachedPage(&buildstate);
137135

138136
/* Do the heap scan */
139137
reltuples = IndexBuildHeapScan(heap, index, indexInfo, true,
140138
bloomBuildCallback, (void *) &buildstate);
141139

142140
/*
143-
* There are could be some items in cached page. Flush this page
144-
* if needed.
141+
* There are could be some items in cached page. Flush this page if
142+
* needed.
145143
*/
146144
if (buildstate.count > 0)
147145
flushCachedPage(index, &buildstate);
@@ -204,9 +202,7 @@ blinsert(Relation index, Datum *values, bool *isnull,
204202

205203
insertCtx = AllocSetContextCreate(CurrentMemoryContext,
206204
"Bloom insert temporary context",
207-
ALLOCSET_DEFAULT_MINSIZE,
208-
ALLOCSET_DEFAULT_INITSIZE,
209-
ALLOCSET_DEFAULT_MAXSIZE);
205+
ALLOCSET_DEFAULT_SIZES);
210206

211207
oldCtx = MemoryContextSwitchTo(insertCtx);
212208

@@ -237,6 +233,13 @@ blinsert(Relation index, Datum *values, bool *isnull,
237233
state = GenericXLogStart(index);
238234
page = GenericXLogRegisterBuffer(state, buffer, 0);
239235

236+
/*
237+
* We might have found a page that was recently deleted by VACUUM. If
238+
* so, we can reuse it, but we must reinitialize it.
239+
*/
240+
if (PageIsNew(page) || BloomPageIsDeleted(page))
241+
BloomInitPage(page, 0);
242+
240243
if (BloomPageAddItem(&blstate, page, itup))
241244
{
242245
/* Success! Apply the change, clean up, and exit */
@@ -295,6 +298,10 @@ blinsert(Relation index, Datum *values, bool *isnull,
295298
LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE);
296299
page = GenericXLogRegisterBuffer(state, buffer, 0);
297300

301+
/* Basically same logic as above */
302+
if (PageIsNew(page) || BloomPageIsDeleted(page))
303+
BloomInitPage(page, 0);
304+
298305
if (BloomPageAddItem(&blstate, page, itup))
299306
{
300307
/* Success! Apply the changes, clean up, and exit */

contrib/bloom/bloom--1.0.sql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
CREATE OR REPLACE FUNCTION blhandler(internal)
1+
/* contrib/bloom/bloom--1.0.sql */
2+
3+
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
4+
\echo Use "CREATE EXTENSION bloom" to load this file. \quit
5+
6+
CREATE FUNCTION blhandler(internal)
27
RETURNS index_am_handler
38
AS 'MODULE_PATHNAME'
49
LANGUAGE C;
510

611
-- Access method
712
CREATE ACCESS METHOD bloom TYPE INDEX HANDLER blhandler;
13+
COMMENT ON ACCESS METHOD bloom IS 'bloom index access method';
814

915
-- Opclasses
1016

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy