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

Commit 24a6193

Browse files
committed
Merge branch 'master' into libpq_compression
2 parents 79a3137 + 6ea9516 commit 24a6193

File tree

741 files changed

+21720
-160164
lines changed

Some content is hidden

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

741 files changed

+21720
-160164
lines changed

.dir-locals.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
(indent-tabs-mode . nil)))
1010
(perl-mode . ((perl-indent-level . 4)
1111
(perl-continued-statement-offset . 2)
12-
(perl-continued-brace-offset . 4)
12+
(perl-continued-brace-offset . -2)
1313
(perl-brace-offset . 0)
1414
(perl-brace-imaginary-offset . 0)
1515
(perl-label-offset . -2)

config/llvm.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ AC_DEFUN([PGAC_LLVM_SUPPORT],
9191
9292
LLVM_BINPATH=`$LLVM_CONFIG --bindir`
9393
94-
# LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
94+
dnl LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
9595
AC_SUBST(LLVM_LIBS)
9696
AC_SUBST(LLVM_CPPFLAGS)
9797
AC_SUBST(LLVM_CFLAGS)

config/perl.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# --------------
66
AC_DEFUN([PGAC_PATH_PERL],
77
[PGAC_PATH_PROGS(PERL, perl)
8+
AC_ARG_VAR(PERL, [Perl program])dnl
89
910
if test "$PERL"; then
1011
pgac_perl_version=`$PERL -v 2>/dev/null | sed -n ['s/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p']`

config/programs.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if test -z "$BISON"; then
5656
*** PostgreSQL then you do not need to worry about this, because the Bison
5757
*** output is pre-generated.)])
5858
fi
59-
# We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
59+
dnl We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
6060
AC_SUBST(BISONFLAGS)
6161
])# PGAC_PATH_BISON
6262

@@ -245,6 +245,7 @@ AC_DEFUN([PGAC_CHECK_GETTEXT],
245245
AC_CHECK_HEADER([libintl.h], [],
246246
[AC_MSG_ERROR([header file <libintl.h> is required for NLS])])
247247
PGAC_PATH_PROGS(MSGFMT, msgfmt)
248+
AC_ARG_VAR(MSGFMT, [msgfmt program for NLS])dnl
248249
if test -z "$MSGFMT"; then
249250
AC_MSG_ERROR([msgfmt is required for NLS])
250251
fi

config/python.m4

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,16 @@
88
# ----------------
99
# Look for Python and set the output variable 'PYTHON' if found,
1010
# fail otherwise.
11+
#
12+
# As the Python 3 transition happens and PEP 394 isn't updated, we
13+
# need to cater to systems that don't have unversioned "python" by
14+
# default. Some systems ship with "python3" by default and perhaps
15+
# have "python" in an optional package. Some systems only have
16+
# "python2" and "python3", in which case it's reasonable to prefer the
17+
# newer version.
1118
AC_DEFUN([PGAC_PATH_PYTHON],
12-
[PGAC_PATH_PROGS(PYTHON, python)
19+
[PGAC_PATH_PROGS(PYTHON, [python python3 python2])
20+
AC_ARG_VAR(PYTHON, [Python program])dnl
1321
if test x"$PYTHON" = x""; then
1422
AC_MSG_ERROR([Python not found])
1523
fi

config/tcl.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
AC_DEFUN([PGAC_PATH_TCLSH],
77
[PGAC_PATH_PROGS(TCLSH, [tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84])
8+
AC_ARG_VAR(TCLSH, [Tcl interpreter program (tclsh)])dnl
89
if test x"$TCLSH" = x""; then
910
AC_MSG_ERROR([Tcl shell not found])
1011
fi

configure

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Guess values for system-dependent variables and create Makefiles.
33
# Generated by GNU Autoconf 2.69 for PostgreSQL 12devel.
44
#
5-
# Report bugs to <pgsql-bugs@postgresql.org>.
5+
# Report bugs to <pgsql-bugs@lists.postgresql.org>.
66
#
77
#
88
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -269,10 +269,10 @@ fi
269269
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
270270
else
271271
$as_echo "$0: Please tell bug-autoconf@gnu.org and
272-
$0: pgsql-bugs@postgresql.org about your system, including
273-
$0: any error possibly output before this message. Then
274-
$0: install a modern shell, or manually run the script
275-
$0: under such a shell if you do have one."
272+
$0: pgsql-bugs@lists.postgresql.org about your system,
273+
$0: including any error possibly output before this
274+
$0: message. Then install a modern shell, or manually run
275+
$0: the script under such a shell if you do have one."
276276
fi
277277
exit 1
278278
fi
@@ -584,7 +584,7 @@ PACKAGE_NAME='PostgreSQL'
584584
PACKAGE_TARNAME='postgresql'
585585
PACKAGE_VERSION='12devel'
586586
PACKAGE_STRING='PostgreSQL 12devel'
587-
PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
587+
PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588588
PACKAGE_URL=''
589589

590590
ac_unique_file="src/backend/access/common/heaptuple.c"
@@ -889,8 +889,13 @@ PKG_CONFIG_PATH
889889
PKG_CONFIG_LIBDIR
890890
ICU_CFLAGS
891891
ICU_LIBS
892+
XML2_CONFIG
892893
LDFLAGS_EX
893-
LDFLAGS_SL'
894+
LDFLAGS_SL
895+
PERL
896+
PYTHON
897+
MSGFMT
898+
TCLSH'
894899

895900

896901
# Initialize some variables set by options.
@@ -1588,13 +1593,18 @@ Some influential environment variables:
15881593
path overriding pkg-config's built-in search path
15891594
ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
15901595
ICU_LIBS linker flags for ICU, overriding pkg-config
1596+
XML2_CONFIG path to xml2-config utility
15911597
LDFLAGS_EX extra linker flags for linking executables only
15921598
LDFLAGS_SL extra linker flags for linking shared libraries only
1599+
PERL Perl program
1600+
PYTHON Python program
1601+
MSGFMT msgfmt program for NLS
1602+
TCLSH Tcl interpreter program (tclsh)
15931603

15941604
Use these variables to override the choices made by `configure' or to help
15951605
it to find libraries and programs with nonstandard names/locations.
15961606

1597-
Report bugs to <pgsql-bugs@postgresql.org>.
1607+
Report bugs to <pgsql-bugs@lists.postgresql.org>.
15981608
_ACEOF
15991609
ac_status=$?
16001610
fi
@@ -1902,9 +1912,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
19021912
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
19031913
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
19041914
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1905-
( $as_echo "## ---------------------------------------- ##
1906-
## Report this to pgsql-bugs@postgresql.org ##
1907-
## ---------------------------------------- ##"
1915+
( $as_echo "## ---------------------------------------------- ##
1916+
## Report this to pgsql-bugs@lists.postgresql.org ##
1917+
## ---------------------------------------------- ##"
19081918
) | sed "s/^/$as_me: WARNING: /" >&2
19091919
;;
19101920
esac
@@ -2961,7 +2971,7 @@ PostgreSQL has apparently not been ported to your platform yet.
29612971
To try a manual configuration, look into the src/template directory
29622972
for a similar platform and use the '--with-template=' option.
29632973

2964-
Please also contact <pgsql-bugs@postgresql.org> to see about
2974+
Please also contact <pgsql-bugs@lists.postgresql.org> to see about
29652975
rectifying this. Include the above 'checking host system type...'
29662976
line.
29672977
*******************************************************************
@@ -5156,7 +5166,6 @@ fi
51565166

51575167
LLVM_BINPATH=`$LLVM_CONFIG --bindir`
51585168

5159-
# LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
51605169

51615170

51625171

@@ -8187,7 +8196,7 @@ $as_echo_n "checking for XML2_CONFIG... " >&6; }
81878196
$as_echo "$XML2_CONFIG" >&6; }
81888197
fi
81898198

8190-
if test -n "$XML2_CONFIG"; then
8199+
if test -n "$XML2_CONFIG"; then
81918200
for pgac_option in `$XML2_CONFIG --cflags`; do
81928201
case $pgac_option in
81938202
-I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
@@ -9537,7 +9546,6 @@ $as_echo "$as_me: WARNING:
95379546
*** PostgreSQL then you do not need to worry about this, because the Bison
95389547
*** output is pre-generated.)" >&2;}
95399548
fi
9540-
# We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
95419549

95429550

95439551
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
@@ -9781,7 +9789,7 @@ fi
97819789

97829790
if test "$with_python" = yes; then
97839791
if test -z "$PYTHON"; then
9784-
for ac_prog in python
9792+
for ac_prog in python python3 python2
97859793
do
97869794
# Extract the first word of "$ac_prog", so it can be a program name with args.
97879795
set dummy $ac_prog; ac_word=$2
@@ -10051,11 +10059,7 @@ fi
1005110059
# other libraries can pull in the pthread functions as a side-effect. We
1005210060
# want to use the -pthread or similar flags directly, and not rely on
1005310061
# the side-effects of linking with some other library.
10054-
#
10055-
# note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
10056-
# invocation below is the first one in the script, and autoconf generates
10057-
# additional code for that, which must not be inside the if-block. AS_IF
10058-
# knows how to do that.
10062+
1005910063
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
1006010064
$as_echo_n "checking for a sed that does not truncate output... " >&6; }
1006110065
if ${ac_cv_path_SED+:} false; then :
@@ -14998,7 +15002,6 @@ fi
1499815002

1499915003
fi
1500015004

15001-
# Check for largefile support (must be after AC_SYS_LARGEFILE)
1500215005
# The cast to long int works around a bug in the HP C Compiler
1500315006
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
1500415007
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -15281,7 +15284,7 @@ fi
1528115284
LIBS_including_readline="$LIBS"
1528215285
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
1528315286

15284-
for ac_func in cbrt clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range utime utimes wcstombs_l
15287+
for ac_func in cbrt clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range uselocale utime utimes wcstombs_l
1528515288
do :
1528615289
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
1528715290
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -15984,9 +15987,9 @@ esac
1598415987

1598515988
fi
1598615989

15987-
# Solaris' getopt() doesn't do what we want for long options, so always use
15988-
# our version on that platform.
15989-
if test "$PORTNAME" = "solaris"; then
15990+
# On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15991+
# (i.e., allow '-' as a flag character), so use our version on those platforms.
15992+
if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
1599015993
case " $LIBOBJS " in
1599115994
*" getopt.$ac_objext "* ) ;;
1599215995
*) LIBOBJS="$LIBOBJS getopt.$ac_objext"
@@ -16014,6 +16017,17 @@ fi
1601416017

1601516018
# Win32 (really MinGW) support
1601616019
if test "$PORTNAME" = "win32"; then
16020+
for ac_func in _configthreadlocale
16021+
do :
16022+
ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16023+
if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16024+
cat >>confdefs.h <<_ACEOF
16025+
#define HAVE__CONFIGTHREADLOCALE 1
16026+
_ACEOF
16027+
16028+
fi
16029+
done
16030+
1601716031
ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
1601816032
if test "x$ac_cv_func_gettimeofday" = xyes; then :
1601916033
$as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
@@ -18179,7 +18193,7 @@ $as_echo_n "checking for MSGFMT... " >&6; }
1817918193
$as_echo "$MSGFMT" >&6; }
1818018194
fi
1818118195

18182-
if test -z "$MSGFMT"; then
18196+
if test -z "$MSGFMT"; then
1818318197
as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
1818418198
fi
1818518199
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
@@ -19759,7 +19773,7 @@ $config_links
1975919773
Configuration commands:
1976019774
$config_commands
1976119775

19762-
Report bugs to <pgsql-bugs@postgresql.org>."
19776+
Report bugs to <pgsql-bugs@lists.postgresql.org>."
1976319777

1976419778
_ACEOF
1976519779
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1

configure.in

Lines changed: 14 additions & 11 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], [12devel], [pgsql-bugs@postgresql.org])
20+
AC_INIT([PostgreSQL], [12devel], [pgsql-bugs@lists.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
@@ -79,7 +79,7 @@ PostgreSQL has apparently not been ported to your platform yet.
7979
To try a manual configuration, look into the src/template directory
8080
for a similar platform and use the '--with-template=' option.
8181

82-
Please also contact <pgsql-bugs@postgresql.org> to see about
82+
Please also contact <pgsql-bugs@lists.postgresql.org> to see about
8383
rectifying this. Include the above 'checking host system type...'
8484
line.
8585
*******************************************************************
@@ -917,6 +917,7 @@ PGAC_ARG_BOOL(with, libxml, no, [build with XML support],
917917

918918
if test "$with_libxml" = yes ; then
919919
PGAC_PATH_PROGS(XML2_CONFIG, xml2-config)
920+
AC_ARG_VAR(XML2_CONFIG, [path to xml2-config utility])dnl
920921
if test -n "$XML2_CONFIG"; then
921922
for pgac_option in `$XML2_CONFIG --cflags`; do
922923
case $pgac_option in
@@ -1078,11 +1079,11 @@ fi
10781079
# other libraries can pull in the pthread functions as a side-effect. We
10791080
# want to use the -pthread or similar flags directly, and not rely on
10801081
# the side-effects of linking with some other library.
1081-
#
1082-
# note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
1083-
# invocation below is the first one in the script, and autoconf generates
1084-
# additional code for that, which must not be inside the if-block. AS_IF
1085-
# knows how to do that.
1082+
1083+
dnl note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
1084+
dnl invocation below is the first one in the script, and autoconf generates
1085+
dnl additional code for that, which must not be inside the if-block. AS_IF
1086+
dnl knows how to do that.
10861087
AS_IF([test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"],
10871088
[ # then
10881089
AX_PTHREAD # set thread flags
@@ -1563,7 +1564,7 @@ if test "$PORTNAME" != "win32"; then
15631564
AH_VERBATIM([_DARWIN_USE_64_BIT_INODE],[])
15641565
fi
15651566

1566-
# Check for largefile support (must be after AC_SYS_LARGEFILE)
1567+
dnl Check for largefile support (must be after AC_SYS_LARGEFILE)
15671568
AC_CHECK_SIZEOF([off_t])
15681569

15691570
# If we don't have largefile support, can't handle segsize >= 2GB.
@@ -1617,6 +1618,7 @@ AC_CHECK_FUNCS(m4_normalize([
16171618
strsignal
16181619
symlink
16191620
sync_file_range
1621+
uselocale
16201622
utime
16211623
utimes
16221624
wcstombs_l
@@ -1737,9 +1739,9 @@ else
17371739
AC_LIBOBJ(getopt_long)
17381740
fi
17391741

1740-
# Solaris' getopt() doesn't do what we want for long options, so always use
1741-
# our version on that platform.
1742-
if test "$PORTNAME" = "solaris"; then
1742+
# On OpenBSD and Solaris, getopt() doesn't do what we want for long options
1743+
# (i.e., allow '-' as a flag character), so use our version on those platforms.
1744+
if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
17431745
AC_LIBOBJ(getopt)
17441746
fi
17451747

@@ -1752,6 +1754,7 @@ fi
17521754

17531755
# Win32 (really MinGW) support
17541756
if test "$PORTNAME" = "win32"; then
1757+
AC_CHECK_FUNCS(_configthreadlocale)
17551758
AC_REPLACE_FUNCS(gettimeofday)
17561759
AC_LIBOBJ(dirmod)
17571760
AC_LIBOBJ(kill)

contrib/amcheck/expected/check_btree.out

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,30 @@ SELECT bt_index_parent_check('delete_test_table_pkey', true);
140140

141141
(1 row)
142142

143+
--
144+
-- BUG #15597: must not assume consistent input toasting state when forming
145+
-- tuple. Bloom filter must fingerprint normalized index tuple representation.
146+
--
147+
CREATE TABLE toast_bug(buggy text);
148+
ALTER TABLE toast_bug ALTER COLUMN buggy SET STORAGE plain;
149+
-- pg_attribute entry for toasty.buggy will have plain storage:
150+
CREATE INDEX toasty ON toast_bug(buggy);
151+
-- Whereas pg_attribute entry for toast_bug.buggy now has extended storage:
152+
ALTER TABLE toast_bug ALTER COLUMN buggy SET STORAGE extended;
153+
-- Insert compressible heap tuple (comfortably exceeds TOAST_TUPLE_THRESHOLD):
154+
INSERT INTO toast_bug SELECT repeat('a', 2200);
155+
-- Should not get false positive report of corruption:
156+
SELECT bt_index_check('toasty', true);
157+
bt_index_check
158+
----------------
159+
160+
(1 row)
161+
143162
-- cleanup
144163
DROP TABLE bttest_a;
145164
DROP TABLE bttest_b;
146165
DROP TABLE bttest_multi;
147166
DROP TABLE delete_test_table;
167+
DROP TABLE toast_bug;
148168
DROP OWNED BY bttest_role; -- permissions
149169
DROP ROLE bttest_role;

0 commit comments

Comments
 (0)