Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft compressed datum slicing #2

Closed
wants to merge 157 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
de22b2f
Draft compressed datum slicing
pramsey Sep 27, 2018
2b04dfc
Improve error reporting for unsupported effective_io_concurrency sett…
tglsfdc Sep 28, 2018
8bddc86
Add application_name to connection authorized msg
sfrost Sep 28, 2018
fdba460
Create an RTE field to record the query's lock mode for each relation.
tglsfdc Sep 30, 2018
a6949ca
doc: Clarify CREATE TABLESPACE documentation
petere Sep 24, 2018
e27453b
Fix ALTER COLUMN TYPE to not open a relation without any lock.
tglsfdc Oct 1, 2018
b66827c
Fix tuple_data_split() to not open a relation without any lock.
tglsfdc Oct 1, 2018
b04aeb0
Add assertions that we hold some relevant lock during relation open.
tglsfdc Oct 1, 2018
cf3dfea
Change PROCEDURE to FUNCTION in CREATE EVENT TRIGGER syntax
petere Oct 1, 2018
e3a25ab
Refactor relation opening for VACUUM and ANALYZE
michaelpq Oct 1, 2018
0fd6a8a
Test passing expanded-value representations to workers.
Oct 2, 2018
80810ca
Fix documentation of pgrowlocks using "lock_type" instead of "modes"
michaelpq Oct 2, 2018
e71cb07
Fix some regression cases
pramsey Oct 2, 2018
3d0f68d
Fix corner-case failures in has_foo_privilege() family of functions.
tglsfdc Oct 2, 2018
625b38e
Set snprintf.c's maximum number of NL arguments to be 31.
tglsfdc Oct 2, 2018
cc2905e
Use slots more widely in tuple mapping code and make naming more cons…
anarazel Oct 2, 2018
6e35939
Change rewriter/planner/executor/plancache to depend on RTE rellockmode.
tglsfdc Oct 2, 2018
a33245a
Don't build static libraries on Cygwin
adunstan Oct 2, 2018
9bc9f72
MAXALIGN the target address where we store flattened value.
Oct 3, 2018
abd9ca3
Make assorted performance improvements in snprintf.c.
tglsfdc Oct 3, 2018
6d842be
Provide fast path in snprintf.c for conversion specs that are just "%s".
tglsfdc Oct 3, 2018
595a0ea
Rationalize snprintf.c's handling of "ll" formats.
tglsfdc Oct 3, 2018
c03c144
Fix issues around EXPLAIN with JIT.
anarazel Oct 3, 2018
9a3cebe
Change executor to just Assert that table locks were already obtained.
tglsfdc Oct 3, 2018
4868e44
Ensure that snprintf.c's fmtint() doesn't overflow when printing INT6…
anarazel Oct 3, 2018
d173652
Replace uint64 use introduced in 4868e446859 in light of 595a0eab7f42.
anarazel Oct 3, 2018
803b130
Add option SKIP_LOCKED to VACUUM and ANALYZE
michaelpq Oct 4, 2018
09921f3
Refactor user-facing SQL functions signalling backends
michaelpq Oct 4, 2018
fb9e93a
Fix duplicate primary keys in partitions
alvherre Oct 4, 2018
9ddef36
Centralize executor's opening/closing of Relations for rangetable ent…
tglsfdc Oct 4, 2018
d73f4c7
In the executor, use an array of pointers to access the rangetable.
tglsfdc Oct 4, 2018
9cd92d1
Add pg_ls_tmpdir function
michaelpq Oct 5, 2018
b5f03dc
Remove redundant allocation
petere Oct 5, 2018
113a659
Ensure that PLPGSQL_DTYPE_ROW variables have valid refname fields.
tglsfdc Oct 5, 2018
c87cb5f
Allow btree comparison functions to return INT_MIN.
tglsfdc Oct 5, 2018
6eb612f
doc: update PG 11 release notes
bmomjian Oct 5, 2018
38921d1
Assign constraint name when cloning FK definition for partitions
michaelpq Oct 6, 2018
e954a72
Improve the accuracy of floating point statistical aggregates.
deanrasheed Oct 6, 2018
07ee62c
Propagate xactStartTimestamp and stmtStartTimestamp to parallel workers.
tglsfdc Oct 6, 2018
0209f02
Don't use is_infinite() where isinf() will do.
tglsfdc Oct 6, 2018
f234365
Remove more redundant relation locking during executor startup.
tglsfdc Oct 6, 2018
29ef2b3
Restore sane locking behavior during parallel query.
tglsfdc Oct 6, 2018
ad08006
Fix event triggers for partitioned tables
alvherre Oct 6, 2018
39808e8
Fix catalog insertion order for ATTACH PARTITION
alvherre Oct 7, 2018
52ed730
Remove some unnecessary fields from Plan trees.
tglsfdc Oct 7, 2018
a9da329
Fix speling error
mhagander Oct 8, 2018
9c2a970
Improve two error messages related to foreign keys on partitioned tables
michaelpq Oct 8, 2018
634b4b7
Track procedure calls in pg_stat_user_functions
petere Oct 5, 2018
eee01d6
Silence compiler warning in Assert()
alvherre Oct 8, 2018
f9eb7c1
Avoid O(N^2) cost in ExecFindRowMark().
tglsfdc Oct 8, 2018
6eb3eb5
Improve snprintf.c's handling of NaN, Infinity, and minus zero.
tglsfdc Oct 8, 2018
82ff0cc
Advance transaction timestamp for intra-procedure transactions.
tglsfdc Oct 8, 2018
7767aad
Fix omissions in snprintf.c's coverage of standard *printf functions.
tglsfdc Oct 8, 2018
212fab9
Relax transactional restrictions on ALTER TYPE ... ADD VALUE (redux).
macdice Oct 8, 2018
bfa6c5a
Convert some long lists in configure.in to one-line-per-entry style.
tglsfdc Oct 9, 2018
c481016
Add pg_ls_archive_statusdir function
michaelpq Oct 9, 2018
aed9fa0
Select appropriate PG_PRINTF_ATTRIBUTE for recent NetBSD.
tglsfdc Oct 9, 2018
6eb4378
Remove no-longer-needed variant expected regression result files.
tglsfdc Oct 9, 2018
36e9d41
Add "B" suffix for bytes to docs
gsstark Oct 6, 2018
b6b297d
Make src/common/exec.c's error logging less ugly.
tglsfdc Oct 9, 2018
f8c10f6
Turn transaction_isolation into GUC enum
petere Oct 9, 2018
ae30786
Test that event triggers work in functions and procedures
petere Oct 5, 2018
f82d4d6
Slightly correct context check for event triggers
petere Oct 5, 2018
ef49305
Force synchronous commit to be enabled for all test_decoding tests.
anarazel Oct 10, 2018
e9edc1b
Fix logical decoding error when system table w/ toast is repeatedly r…
anarazel Oct 10, 2018
86896be
Move timeofday() implementation out of nabstime.c.
anarazel Oct 11, 2018
2d10def
Remove timetravel extension.
anarazel Sep 28, 2018
cda6a8d
Remove deprecated abstime, reltime, tinterval datatypes.
anarazel Sep 28, 2018
b34e84f
Add TAP tests for pg_verify_checksums
michaelpq Oct 12, 2018
f188538
Make float exponent output on Windows look the same as elsewhere.
tglsfdc Oct 12, 2018
c7d43c4
Correct attach/detach logic for FKs in partitions
alvherre Oct 12, 2018
24a2c43
Remove dead reference to ecpg resultmap file.
tglsfdc Oct 12, 2018
13cd720
Simplify use of AllocSetContextCreate() wrapper macro.
tglsfdc Oct 12, 2018
240cd6b
Another round of portability hacking on ECPG regression tests.
tglsfdc Oct 12, 2018
5e9d7b2
Make an editing pass over v11 release notes.
tglsfdc Oct 13, 2018
0027915
Doc: copy-editing for CREATE INDEX reference page.
tglsfdc Oct 13, 2018
d3ef93f
Doc: further copy-editing for v11 release notes.
tglsfdc Oct 13, 2018
8f850f2
Doc: still further copy-editing for v11 release notes.
tglsfdc Oct 14, 2018
1df21dd
Avoid duplicate XIDs at recovery when building initial snapshot
michaelpq Oct 14, 2018
e9f42d5
Clean up/tighten up coercibility checks in opr_sanity regression test.
tglsfdc Oct 14, 2018
7d4a10e
Use PlaceHolderVars within the quals of a FULL JOIN.
tglsfdc Oct 14, 2018
b403ea4
Make some subquery-using test cases a bit more robust.
tglsfdc Oct 14, 2018
98afb83
contrib/bloom documentation improvement
akorotkov Oct 14, 2018
981b64f
Add missed tag in bloom.sgml
akorotkov Oct 14, 2018
9274c57
Fixes for "Glyph not available" warnings from FOP
petere Oct 15, 2018
35584fd
Make spelling of "acknowledgment" consistent
petere Oct 15, 2018
5b75a4f
pgbench: Report errors during run better
petere Oct 9, 2018
d48da36
Check for stack overrun in standard_ProcessUtility().
tglsfdc Oct 15, 2018
e73ca79
Move the replication lag tracker into heap memory.
macdice Oct 15, 2018
9d906f1
Move generic slot support functions from heaptuple.c into execTuples.c.
anarazel Oct 14, 2018
c525734
Move TupleTableSlots boolean member into one flag variable.
anarazel Oct 15, 2018
62649ba
Correct constness of a few variables.
anarazel Oct 16, 2018
3dfef0c
Avoid statically allocating gmtsub()'s timezone workspace.
tglsfdc Oct 16, 2018
17d6a8f
Improve stability of recently-added regression test case.
tglsfdc Oct 16, 2018
c015ccb
Make PostgresNode.pm's poll_query_until() more chatty about failures.
tglsfdc Oct 16, 2018
02a30a0
Correct constness of system attributes in heap.c & prerequisites.
anarazel Oct 16, 2018
fd85e9f
Avoid statically allocating formatting.c's format string caches.
tglsfdc Oct 16, 2018
f7a953c
Avoid rare race condition in privileges.sql regression test.
tglsfdc Oct 16, 2018
2c300c6
Be smarter about age-counter overflow in formatting.c caches.
tglsfdc Oct 16, 2018
d1211c6
Add macro to cast away const without allowing changes to underlying t…
anarazel Oct 16, 2018
93ca02e
Mark constantly allocated dest receiver as const.
anarazel Oct 16, 2018
68fc227
Back off using -isysroot on Darwin.
tglsfdc Oct 16, 2018
28d750c
Reorder FmgrBuiltin members, saving 25% in size.
anarazel Oct 16, 2018
92dff34
Formatting cleanup in ecpglib/prepare.c.
tglsfdc Oct 17, 2018
e15aae8
Avoid statically allocating statement cache in ecpglib/prepare.c.
tglsfdc Oct 17, 2018
e7eb07f
Improve tzparse's handling of TZDEFRULES ("posixrules") zone data.
tglsfdc Oct 17, 2018
d8cc161
Minor additional improvements for ecpglib/prepare.c.
tglsfdc Oct 17, 2018
a7a1b44
Fix crash in multi-insert COPY
petere Oct 17, 2018
9958b2b
Fix minor bug in isolationtester.
tglsfdc Oct 17, 2018
48d818e
Const-ify a few more large static tables.
tglsfdc Oct 17, 2018
26cb820
Improve some comments related to executor result relations.
tglsfdc Oct 17, 2018
e74dd00
Still further rethinking of build changes for macOS Mojave.
tglsfdc Oct 18, 2018
197e4af
Refactor pid, random seed and start time initialization.
macdice Oct 19, 2018
350410b
Add missing quote_identifier calls for CREATE TRIGGER ... REFERENCING.
tglsfdc Oct 19, 2018
d55241a
Use whitelist to choose files scanned with pg_verify_checksums
michaelpq Oct 19, 2018
e65e8f8
Silence perlcritic warning about missing return.
tglsfdc Oct 19, 2018
13877d3
Update time zone data files to tzdata release 2018f.
tglsfdc Oct 19, 2018
12bfb77
Sync our copy of the timezone library with IANA release tzcode2018f.
tglsfdc Oct 19, 2018
2ddb914
Server-side fix for delayed NOTIFY and SIGTERM processing.
tglsfdc Oct 20, 2018
4247db6
Client-side fixes for delayed NOTIFY receipt.
tglsfdc Oct 20, 2018
ce5d342
Lower privilege level of programs calling regression_main
adunstan Oct 20, 2018
c468bd5
Don't try to test files named with a trailing dot on Windows
adunstan Oct 21, 2018
31ff51a
Fix some grammar errors in bloom.sgml
akorotkov Oct 21, 2018
17f206f
Set pg_class.relhassubclass for partitioned indexes
michaelpq Oct 22, 2018
55853d6
Clarify descriptions of relhassubclass and relispartition in pg_class
michaelpq Oct 22, 2018
807e4bc
Sprinkle some const decorations
petere Oct 23, 2018
e6f5d1a
Drop const cast from dlsym() calls
petere Oct 23, 2018
c903bb7
Remove get_atttypmod()
petere Oct 18, 2018
5d7c703
Remove get_attidentity()
petere Oct 23, 2018
5ef037c
List wait events in alphabetical order
michaelpq Oct 24, 2018
040a1df
Correctly set t_self for heap tuples in expand_tuple
adunstan Oct 24, 2018
4beea55
Fix typo in regression test comment
adunstan Oct 24, 2018
f2898de
Improve unconstify() documentation
petere Oct 24, 2018
0a8590b
Apply unconstify() in more places
petere Oct 24, 2018
1007465
Add pg_promote function
michaelpq Oct 25, 2018
292ef6e
Add tab completion of EXECUTE FUNCTION for CREATE TRIGGER in psql
michaelpq Oct 26, 2018
5953c99
Improve tab completion of CREATE EVENT TRIGGER in psql
michaelpq Oct 26, 2018
1df92ee
Fix perl searchpath for modern perl for MSVC tools
adunstan Oct 28, 2018
051a149
Remove incorrect comment in dshash.c.
macdice Oct 28, 2018
0993b8a
Improve description of pg_attrdef in documentation
michaelpq Oct 29, 2018
2fe42ba
pg_restore: Augment documentation for -N option
petere Oct 29, 2018
a9e5f8e
Exclude temporary directories from pgindent
petere Oct 29, 2018
56c0484
Fix missing whitespace in pg_dump ref page
mhagander Oct 29, 2018
d5eec4e
Add pg_partition_tree to display information about partitions
michaelpq Oct 30, 2018
c34bca9
Consolidate cross-option checks in pg_restore
michaelpq Oct 30, 2018
c2c7c26
pg_rewind: Remove unused macro
petere Oct 30, 2018
14a158f
Fix interaction of CASE and ArrayCoerceExpr.
tglsfdc Oct 30, 2018
5c2e0ca
Update time zone data files to tzdata release 2018g.
tglsfdc Oct 31, 2018
10bfda0
Sync our copy of the timezone library with IANA release tzcode2018g.
tglsfdc Oct 31, 2018
c4ab62f
Fix typo in xlog.c.
anarazel Oct 31, 2018
696b0c5
Fix memory leak in repeated SPGIST index scans.
tglsfdc Oct 31, 2018
691d79a
Disallow starting server with insufficient wal_level for existing slot.
anarazel Oct 31, 2018
cb6f8a9
Adjust trace_sort log messages.
petergeoghegan Nov 1, 2018
917b3c6
Draft compressed datum slicing
pramsey Sep 27, 2018
8e65668
Fix some regression cases
pramsey Oct 2, 2018
bae41f8
Fix uncompress for case where matching portion is longer than output …
pramsey Nov 1, 2018
200b746
Merge branch 'slicing' of github.com:pramsey/postgres into slicing
pramsey Nov 1, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 25 additions & 10 deletions config/c-compiler.m4
Expand Up @@ -21,21 +21,36 @@ fi])# PGAC_C_SIGNED
# -----------------------
# Select the format archetype to be used by gcc to check printf-type functions.
# We prefer "gnu_printf", as that most closely matches the features supported
# by src/port/snprintf.c (particularly the %m conversion spec).
# by src/port/snprintf.c (particularly the %m conversion spec). However,
# on some NetBSD versions, that doesn't work while "__syslog__" does.
# If all else fails, use "printf".
AC_DEFUN([PGAC_PRINTF_ARCHETYPE],
[AC_CACHE_CHECK([for printf format archetype], pgac_cv_printf_archetype,
[pgac_cv_printf_archetype=gnu_printf
PGAC_TEST_PRINTF_ARCHETYPE
if [[ "$ac_archetype_ok" = no ]]; then
pgac_cv_printf_archetype=__syslog__
PGAC_TEST_PRINTF_ARCHETYPE
if [[ "$ac_archetype_ok" = no ]]; then
pgac_cv_printf_archetype=printf
fi
fi])
AC_DEFINE_UNQUOTED([PG_PRINTF_ATTRIBUTE], [$pgac_cv_printf_archetype],
[Define to best printf format archetype, usually gnu_printf if available.])
])# PGAC_PRINTF_ARCHETYPE

# Subroutine: test $pgac_cv_printf_archetype, set $ac_archetype_ok to yes or no
AC_DEFUN([PGAC_TEST_PRINTF_ARCHETYPE],
[ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[extern int
pgac_write(int ignore, const char *fmt,...)
__attribute__((format(gnu_printf, 2, 3)));], [])],
[pgac_cv_printf_archetype=gnu_printf],
[pgac_cv_printf_archetype=printf])
ac_c_werror_flag=$ac_save_c_werror_flag])
AC_DEFINE_UNQUOTED([PG_PRINTF_ATTRIBUTE], [$pgac_cv_printf_archetype],
[Define to gnu_printf if compiler supports it, else printf.])
])# PGAC_PRINTF_ARCHETYPE
[extern void pgac_write(int ignore, const char *fmt,...)
__attribute__((format($pgac_cv_printf_archetype, 2, 3)));],
[pgac_write(0, "error %s: %m", "foo");])],
[ac_archetype_ok=yes],
[ac_archetype_ok=no])
ac_c_werror_flag=$ac_save_c_werror_flag
])# PGAC_TEST_PRINTF_ARCHETYPE


# PGAC_TYPE_64BIT_INT(TYPE)
Expand Down
58 changes: 44 additions & 14 deletions configure
Expand Up @@ -668,7 +668,7 @@ python_majorversion
PYTHON
perl_embed_ldflags
perl_embed_ccflags
perl_includedir
perl_includespec
perl_useshrplib
perl_privlibexp
perl_archlibexp
Expand Down Expand Up @@ -9775,11 +9775,12 @@ documentation for details. Use --without-perl to disable building
PL/Perl." "$LINENO" 5
fi
# On most platforms, archlibexp is also where the Perl include files live ...
perl_includedir="$perl_archlibexp"
# ... but on some macOS versions, we must look under $PG_SYSROOT instead
if test x"$PG_SYSROOT" != x"" ; then
if test -d "$PG_SYSROOT$perl_archlibexp" ; then
perl_includedir="$PG_SYSROOT$perl_archlibexp"
perl_includespec="-I$perl_archlibexp/CORE"
# ... but on newer macOS versions, we must use -iwithsysroot to look
# under $PG_SYSROOT
if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
fi
fi

Expand Down Expand Up @@ -13583,28 +13584,57 @@ $as_echo_n "checking for printf format archetype... " >&6; }
if ${pgac_cv_printf_archetype+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
pgac_cv_printf_archetype=gnu_printf
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
extern int
pgac_write(int ignore, const char *fmt,...)
__attribute__((format(gnu_printf, 2, 3)));
extern void pgac_write(int ignore, const char *fmt,...)
__attribute__((format($pgac_cv_printf_archetype, 2, 3)));
int
main ()
{
pgac_write(0, "error %s: %m", "foo");
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_archetype_ok=yes
else
ac_archetype_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag

if [ "$ac_archetype_ok" = no ]; then
pgac_cv_printf_archetype=__syslog__
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
extern void pgac_write(int ignore, const char *fmt,...)
__attribute__((format($pgac_cv_printf_archetype, 2, 3)));
int
main ()
{
pgac_write(0, "error %s: %m", "foo");
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
pgac_cv_printf_archetype=gnu_printf
ac_archetype_ok=yes
else
pgac_cv_printf_archetype=printf
ac_archetype_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag

if [ "$ac_archetype_ok" = no ]; then
pgac_cv_printf_archetype=printf
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
$as_echo "$pgac_cv_printf_archetype" >&6; }
Expand Down Expand Up @@ -15100,7 +15130,7 @@ fi
LIBS_including_readline="$LIBS"
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`

for ac_func in cbrt clock_gettime fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open symlink sync_file_range utime utimes wcstombs_l
for ac_func in cbrt clock_gettime fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul symlink sync_file_range utime utimes wcstombs_l
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Expand Down Expand Up @@ -18102,7 +18132,7 @@ fi
# check for <perl.h>
if test "$with_perl" = yes; then
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$perl_includedir/CORE"
CPPFLAGS="$CPPFLAGS $perl_includespec"
ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
"
if test "x$ac_cv_header_perl_h" = xyes; then :
Expand Down
87 changes: 77 additions & 10 deletions configure.in
Expand Up @@ -1045,14 +1045,15 @@ documentation for details. Use --without-perl to disable building
PL/Perl.])
fi
# On most platforms, archlibexp is also where the Perl include files live ...
perl_includedir="$perl_archlibexp"
# ... but on some macOS versions, we must look under $PG_SYSROOT instead
if test x"$PG_SYSROOT" != x"" ; then
if test -d "$PG_SYSROOT$perl_archlibexp" ; then
perl_includedir="$PG_SYSROOT$perl_archlibexp"
perl_includespec="-I$perl_archlibexp/CORE"
# ... but on newer macOS versions, we must use -iwithsysroot to look
# under $PG_SYSROOT
if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
fi
fi
AC_SUBST(perl_includedir)dnl
AC_SUBST(perl_includespec)dnl
PGAC_CHECK_PERL_EMBED_CCFLAGS
PGAC_CHECK_PERL_EMBED_LDFLAGS
fi
Expand Down Expand Up @@ -1292,7 +1293,34 @@ AC_SUBST(UUID_LIBS)

AC_HEADER_STDBOOL

AC_CHECK_HEADERS([atomic.h crypt.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h])
AC_CHECK_HEADERS(m4_normalize([
atomic.h
crypt.h
fp_class.h
getopt.h
ieeefp.h
ifaddrs.h
langinfo.h
mbarrier.h
poll.h
sys/epoll.h
sys/ipc.h
sys/prctl.h
sys/procctl.h
sys/pstat.h
sys/resource.h
sys/select.h
sys/sem.h
sys/shm.h
sys/sockio.h
sys/tas.h
sys/un.h
termios.h
ucred.h
utime.h
wchar.h
wctype.h
]))

# On BSD, test for net/if.h will fail unless sys/socket.h
# is included first.
Expand Down Expand Up @@ -1571,7 +1599,32 @@ PGAC_FUNC_WCSTOMBS_L
LIBS_including_readline="$LIBS"
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`

AC_CHECK_FUNCS([cbrt clock_gettime fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open symlink sync_file_range utime utimes wcstombs_l])
AC_CHECK_FUNCS(m4_normalize([
cbrt
clock_gettime
fdatasync
getifaddrs
getpeerucred
getrlimit
mbstowcs_l
memmove
poll
posix_fallocate
ppoll
pstat
pthread_is_threaded_np
readlink
setproctitle
setproctitle_fast
setsid
shm_open
strchrnul
symlink
sync_file_range
utime
utimes
wcstombs_l
]))

AC_REPLACE_FUNCS(fseeko)
case $host_os in
Expand Down Expand Up @@ -1640,7 +1693,21 @@ else
AC_CHECK_FUNCS([fpclass fp_class fp_class_d class], [break])
fi

AC_REPLACE_FUNCS([crypt dlopen fls getopt getrusage inet_aton mkdtemp random rint srandom strlcat strlcpy strnlen])
AC_REPLACE_FUNCS(m4_normalize([
crypt
dlopen
fls
getopt
getrusage
inet_aton
mkdtemp
random
rint
srandom
strlcat
strlcpy
strnlen
]))

case $host_os in

Expand Down Expand Up @@ -2155,7 +2222,7 @@ fi
# check for <perl.h>
if test "$with_perl" = yes; then
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$perl_includedir/CORE"
CPPFLAGS="$CPPFLAGS $perl_includespec"
AC_CHECK_HEADER(perl.h, [], [AC_MSG_ERROR([header file <perl.h> is required for Perl])],
[#include <EXTERN.h>])
# While we're at it, check that we can link to libperl.
Expand Down
3 changes: 1 addition & 2 deletions contrib/auto_explain/auto_explain.c
Expand Up @@ -363,8 +363,7 @@ explain_ExecutorEnd(QueryDesc *queryDesc)
if (es->analyze && auto_explain_log_triggers)
ExplainPrintTriggers(es, queryDesc);
if (es->costs)
ExplainPrintJIT(es, queryDesc->estate->es_jit_flags,
queryDesc->estate->es_jit_combined_instr, -1);
ExplainPrintJITSummary(es, queryDesc);
ExplainEndOutput(es);

/* Remove last line break */
Expand Down
26 changes: 11 additions & 15 deletions contrib/btree_gist/expected/inet.out
Expand Up @@ -64,18 +64,16 @@ SELECT count(*) FROM inettmp WHERE a > '89.225.196.191'::inet;
386
(1 row)

VACUUM inettmp;
VACUUM ANALYZE inettmp;
-- gist_inet_ops lacks a fetch function, so this should not be index-only scan
EXPLAIN (COSTS OFF)
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
QUERY PLAN
--------------------------------------------------------
QUERY PLAN
--------------------------------------------------
Aggregate
-> Bitmap Heap Scan on inettmp
Recheck Cond: (a = '89.225.196.191'::inet)
-> Bitmap Index Scan on inetidx
Index Cond: (a = '89.225.196.191'::inet)
(5 rows)
-> Index Scan using inetidx on inettmp
Index Cond: (a = '89.225.196.191'::inet)
(3 rows)

SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
count
Expand All @@ -88,14 +86,12 @@ CREATE INDEX ON inettmp USING gist (a gist_inet_ops, a inet_ops);
-- likewise here (checks for core planner bug)
EXPLAIN (COSTS OFF)
SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
QUERY PLAN
--------------------------------------------------------
QUERY PLAN
----------------------------------------------------
Aggregate
-> Bitmap Heap Scan on inettmp
Recheck Cond: (a = '89.225.196.191'::inet)
-> Bitmap Index Scan on inettmp_a_a1_idx
Index Cond: (a = '89.225.196.191'::inet)
(5 rows)
-> Index Scan using inettmp_a_a1_idx on inettmp
Index Cond: (a = '89.225.196.191'::inet)
(3 rows)

SELECT count(*) FROM inettmp WHERE a = '89.225.196.191'::inet;
count
Expand Down
2 changes: 1 addition & 1 deletion contrib/btree_gist/sql/inet.sql
Expand Up @@ -30,7 +30,7 @@ SELECT count(*) FROM inettmp WHERE a >= '89.225.196.191'::inet;

SELECT count(*) FROM inettmp WHERE a > '89.225.196.191'::inet;

VACUUM inettmp;
VACUUM ANALYZE inettmp;

-- gist_inet_ops lacks a fetch function, so this should not be index-only scan
EXPLAIN (COSTS OFF)
Expand Down