Skip to content

Commit bc81e86

Browse files
committed
Merge branch 'PGPROEE9_6' into PGPROEE9_6_ALPHA
2 parents cdf45c3 + 3fe43df commit bc81e86

File tree

13 files changed

+921
-38
lines changed

13 files changed

+921
-38
lines changed

.gitlab-ci.yml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
image: debian
22

33
stages:
4-
- build
54
- test
65

76
before_script:
@@ -10,32 +9,18 @@ before_script:
109
- uname -a
1110
- df -h
1211

13-
build:ubuntu-16.04:
14-
stage: build
15-
image: ubuntu:16.04
16-
only:
17-
- PGPROEE9_6
18-
before_script:
19-
- apt-get update && apt-get install -y gcc make flex bison libreadline-dev zlib1g-dev jade libzstd0 libzstd-dev
20-
script:
21-
- ./configure
22-
- make -j $CORES
23-
- apt-get install sudo
24-
- sudo make install
25-
when: always
26-
27-
test:
12+
test:ubuntu-16.04:
2813
stage: test
2914
image: ubuntu:16.04
3015
only:
3116
- PGPROEE9_6
3217
before_script:
33-
- apt-get update && apt-get install -y gcc make flex bison libreadline-dev zlib1g-dev jade libzstd0 libzstd-dev
18+
- apt-get update && apt-get install -y sudo gcc make flex bison libreadline-dev zlib1g-dev openjade libzstd0 libzstd-dev opensp
3419
script:
35-
- ./configure
36-
- make -j $CORES
37-
- apt-get install sudo
38-
- adduser --disabled-password --gecos '' postgres
39-
- echo '%postgres ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
40-
- su -m postgres -c make check
20+
- ./configure --prefix=/opt/pgproee
21+
- make -j $CORES world
22+
- sudo make install-world
23+
- make check
24+
- cd contrib
25+
- make check
4126
when: always

configure

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,7 @@ LDFLAGS_EX
704704
ELF_SYS
705705
EGREP
706706
GREP
707+
with_zstd
707708
with_zlib
708709
with_system_tzdata
709710
with_libxslt
@@ -847,6 +848,7 @@ with_libxml
847848
with_libxslt
848849
with_system_tzdata
849850
with_zlib
851+
with_zstd
850852
with_gnu_ld
851853
enable_largefile
852854
enable_float4_byval
@@ -1540,6 +1542,7 @@ Optional Packages:
15401542
--with-system-tzdata=DIR
15411543
use system time zone data in DIR
15421544
--without-zlib do not use Zlib
1545+
--with-zstd build with libzstd
15431546
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
15441547

15451548
Some influential environment variables:
@@ -6174,6 +6177,88 @@ fi
61746177

61756178

61766179

6180+
#
6181+
# ZStd
6182+
#
6183+
6184+
6185+
6186+
# Check whether --with-zstd was given.
6187+
if test "${with_zstd+set}" = set; then :
6188+
withval=$with_zstd;
6189+
case $withval in
6190+
yes)
6191+
6192+
$as_echo "#define CFS_COMPRESSOR 6" >>confdefs.h
6193+
6194+
;;
6195+
no)
6196+
:
6197+
;;
6198+
*)
6199+
as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
6200+
;;
6201+
esac
6202+
6203+
else
6204+
with_zstd=no
6205+
6206+
fi
6207+
6208+
6209+
6210+
6211+
if test "$with_zstd" = yes ; then
6212+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
6213+
$as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
6214+
if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
6215+
$as_echo_n "(cached) " >&6
6216+
else
6217+
ac_check_lib_save_LIBS=$LIBS
6218+
LIBS="-lzstd $LIBS"
6219+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6220+
/* end confdefs.h. */
6221+
6222+
/* Override any GCC internal prototype to avoid an error.
6223+
Use char because int might match the return type of a GCC
6224+
builtin and then its argument prototype would still apply. */
6225+
#ifdef __cplusplus
6226+
extern "C"
6227+
#endif
6228+
char ZSTD_compress ();
6229+
int
6230+
main ()
6231+
{
6232+
return ZSTD_compress ();
6233+
;
6234+
return 0;
6235+
}
6236+
_ACEOF
6237+
if ac_fn_c_try_link "$LINENO"; then :
6238+
ac_cv_lib_zstd_ZSTD_compress=yes
6239+
else
6240+
ac_cv_lib_zstd_ZSTD_compress=no
6241+
fi
6242+
rm -f core conftest.err conftest.$ac_objext \
6243+
conftest$ac_exeext conftest.$ac_ext
6244+
LIBS=$ac_check_lib_save_LIBS
6245+
fi
6246+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
6247+
$as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
6248+
if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
6249+
cat >>confdefs.h <<_ACEOF
6250+
#define HAVE_LIBZSTD 1
6251+
_ACEOF
6252+
6253+
LIBS="-lzstd $LIBS"
6254+
6255+
else
6256+
as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
6257+
fi
6258+
6259+
fi
6260+
6261+
61776262
#
61786263
# Elf
61796264
#

configure.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,17 @@ PGAC_ARG_BOOL(with, zlib, yes,
854854
[do not use Zlib])
855855
AC_SUBST(with_zlib)
856856

857+
#
858+
# ZStd
859+
#
860+
PGAC_ARG_BOOL(with, zstd, no, [build with libzstd], [AC_DEFINE([CFS_COMPRESSOR], 6, [Define to 6 to use libzstd support when building CFS. (--with-zstd)])])
861+
AC_SUBST(with_zstd)
862+
863+
if test "$with_zstd" = yes ; then
864+
AC_CHECK_LIB(zstd, ZSTD_compress, [], [AC_MSG_ERROR([library 'zstd' is required for ZSTD support])])
865+
fi
866+
867+
857868
#
858869
# Elf
859870
#

contrib/pg_hint_plan/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ subdir = contrib/pg_hint_plan
2727
top_builddir = ../..
2828
include $(top_builddir)/src/Makefile.global
2929
include $(top_srcdir)/contrib/contrib-global.mk
30-
override CFLAGS += -I$(top_builddir)/src/pl/plpgsql/src
31-
REGRESS = init base_plan pg_hint_plan
30+
override CFLAGS += -I$(top_srcdir)/src/pl/plpgsql/src
31+
REGRESS = init base_plan
3232
endif
3333

3434
STARBALL96 = pg_hint_plan96-$(HINTPLANVER).tar.gz

contrib/pg_hint_plan/pg_hint_plan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@ parse_hints(HintState *hstate, Query *parse, const char *str)
15101510
char *keyword = parser->keyword;
15111511
Hint *hint;
15121512

1513-
if (strcasecmp(buf.data, keyword) != 0)
1513+
if (pg_strcasecmp(buf.data, keyword) != 0)
15141514
continue;
15151515

15161516
hint = parser->create_func(head, keyword, parser->hint_keyword);

doc/src/sgml/contrib.sgml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ CREATE EXTENSION <replaceable>module_name</> FROM unpackaged;
132132
&pgbuffercache;
133133
&pgcrypto;
134134
&pgfreespacemap;
135+
&pghintplan;
135136
&pgpathman;
136137
&pgprewarm;
137138
&pgquerystate;

doc/src/sgml/filelist.sgml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@
138138
<!ENTITY pgbuffercache SYSTEM "pgbuffercache.sgml">
139139
<!ENTITY pgcrypto SYSTEM "pgcrypto.sgml">
140140
<!ENTITY pgfreespacemap SYSTEM "pgfreespacemap.sgml">
141+
<!ENTITY pghintplan SYSTEM "pghintplan.sgml">
141142
<!ENTITY pgpathman SYSTEM "pgpathman.sgml">
142143
<!ENTITY pgprewarm SYSTEM "pgprewarm.sgml">
143144
<!ENTITY pgquerystate SYSTEM "pgquerystate.sgml">

0 commit comments

Comments
 (0)