Skip to content

Commit daf54f2

Browse files
committed
Merge branch 'PGPROEE9_6' of https://gitlab.postgrespro.ru/pgpro-dev/postgrespro into PGPROEE9_6_CFS
2 parents a19ee0a + 3fe43df commit daf54f2

File tree

131 files changed

+62253
-4806
lines changed

Some content is hidden

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

131 files changed

+62253
-4806
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: 94 additions & 9 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.6.0.
3+
# Generated by GNU Autoconf 2.69 for PostgreSQL 9.6.1.
44
#
55
# Report bugs to <bugs@postgrespro.ru>.
66
#
@@ -583,8 +583,8 @@ MAKEFLAGS=
583583
# Identity of this package.
584584
PACKAGE_NAME='PostgreSQL'
585585
PACKAGE_TARNAME='postgrespro'
586-
PACKAGE_VERSION='9.6.0'
587-
PACKAGE_STRING='PostgreSQL 9.6.0'
586+
PACKAGE_VERSION='9.6.1'
587+
PACKAGE_STRING='PostgreSQL 9.6.1'
588588
PACKAGE_BUGREPORT='bugs@postgrespro.ru'
589589
PACKAGE_URL=''
590590

@@ -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
@@ -1404,7 +1406,7 @@ if test "$ac_init_help" = "long"; then
14041406
# Omit some internal or obsolete options to make the list less imposing.
14051407
# This message is too long to be a string in the A/UX 3.1 sh.
14061408
cat <<_ACEOF
1407-
\`configure' configures PostgreSQL 9.6.0 to adapt to many kinds of systems.
1409+
\`configure' configures PostgreSQL 9.6.1 to adapt to many kinds of systems.
14081410

14091411
Usage: $0 [OPTION]... [VAR=VALUE]...
14101412

@@ -1469,7 +1471,7 @@ fi
14691471

14701472
if test -n "$ac_init_help"; then
14711473
case $ac_init_help in
1472-
short | recursive ) echo "Configuration of PostgreSQL 9.6.0:";;
1474+
short | recursive ) echo "Configuration of PostgreSQL 9.6.1:";;
14731475
esac
14741476
cat <<\_ACEOF
14751477

@@ -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:
@@ -1622,7 +1625,7 @@ fi
16221625
test -n "$ac_init_help" && exit $ac_status
16231626
if $ac_init_version; then
16241627
cat <<\_ACEOF
1625-
PostgreSQL configure 9.6.0
1628+
PostgreSQL configure 9.6.1
16261629
generated by GNU Autoconf 2.69
16271630

16281631
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2334,7 +2337,7 @@ cat >config.log <<_ACEOF
23342337
This file contains any messages produced by compilers while
23352338
running configure, to aid debugging if configure makes a mistake.
23362339

2337-
It was created by PostgreSQL $as_me 9.6.0, which was
2340+
It was created by PostgreSQL $as_me 9.6.1, which was
23382341
generated by GNU Autoconf 2.69. Invocation command line was
23392342

23402343
$ $0 $@
@@ -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
#
@@ -18366,7 +18451,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1836618451
# report actual input values of CONFIG_FILES etc. instead of their
1836718452
# values after options handling.
1836818453
ac_log="
18369-
This file was extended by PostgreSQL $as_me 9.6.0, which was
18454+
This file was extended by PostgreSQL $as_me 9.6.1, which was
1837018455
generated by GNU Autoconf 2.69. Invocation command line was
1837118456

1837218457
CONFIG_FILES = $CONFIG_FILES
@@ -18436,7 +18521,7 @@ _ACEOF
1843618521
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1843718522
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1843818523
ac_cs_version="\\
18439-
PostgreSQL config.status 9.6.0
18524+
PostgreSQL config.status 9.6.1
1844018525
configured by $0, generated by GNU Autoconf 2.69,
1844118526
with options \\"\$ac_cs_config\\"
1844218527

configure.in

Lines changed: 12 additions & 1 deletion
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.6.0], [bugs@postgrespro.ru],[postgrespro])
20+
AC_INIT([PostgreSQL], [9.6.1], [bugs@postgrespro.ru],[postgrespro])
2121
PACKAGE_TARNAME=postgrespro
2222

2323
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
@@ -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/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ SUBDIRS = \
6262
sr_plan \
6363
pg_arman \
6464
pg_pathman \
65-
shared_ispell
65+
shared_ispell \
66+
pg_hint_plan
6667

6768
ifeq ($(with_openssl),yes)
6869
SUBDIRS += sslinfo

contrib/oid2name/oid2name.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ help(const char *progname)
188188
" -x extended (show additional columns)\n"
189189
" -?, --help show this help, then exit\n"
190190
"\nThe default action is to show all database OIDs.\n\n"
191-
"Report bugs to <pgsql-bugs@postgresql.org>.\n",
191+
"Report bugs to <" PACKAGE_BUGREPORT ">.\n",
192192
progname, progname);
193193
}
194194

contrib/pg_hint_plan/COPYRIGHT

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright (c) 2012-2016, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright notice,
8+
this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above copyright
10+
notice, this list of conditions and the following disclaimer in the
11+
documentation and/or other materials provided with the distribution.
12+
* Neither the name of the NIPPON TELEGRAPH AND TELEPHONE CORPORATION
13+
(NTT) nor the names of its contributors may be used to endorse or
14+
promote products derived from this software without specific prior
15+
written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
core.c and make_join_rel.c are parts of PostgreSQL Database Management System.
2+
(formerly known as Postgres, then as Postgres95)
3+
Copyright holders of those files are following organizations:
4+
5+
Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
6+
7+
Portions Copyright (c) 1994, The Regents of the University of California
8+
9+
Permission to use, copy, modify, and distribute this software and its
10+
documentation for any purpose, without fee, and without a written agreement
11+
is hereby granted, provided that the above copyright notice and this
12+
paragraph and the following two paragraphs appear in all copies.
13+
14+
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
15+
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
16+
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
17+
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
18+
POSSIBILITY OF SUCH DAMAGE.
19+
20+
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
21+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22+
AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
23+
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
24+
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

contrib/pg_hint_plan/Makefile

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#
2+
# pg_hint_plan: Makefile
3+
#
4+
# Copyright (c) 2012-2016, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
5+
#
6+
7+
MODULES = pg_hint_plan
8+
HINTPLANVER = 1.1.3
9+
10+
REGRESS = init base_plan pg_hint_plan ut-init ut-A ut-S ut-J ut-L ut-G ut-R ut-fdw ut-fini
11+
12+
REGRESSION_EXPECTED = expected/init.out expected/base_plan.out expected/pg_hint_plan.out expected/ut-A.out expected/ut-S.out expected/ut-J.out expected/ut-L.out expected/ut-G.out
13+
14+
REGRESS_OPTS = --encoding=UTF8
15+
16+
EXTENSION = pg_hint_plan
17+
DATA = pg_hint_plan--1.1.3.sql
18+
19+
EXTRA_CLEAN = sql/ut-fdw.sql expected/ut-fdw.out
20+
21+
ifdef USE_PGXS
22+
PG_CONFIG = pg_config
23+
PGXS := $(shell $(PG_CONFIG) --pgxs)
24+
include $(PGXS)
25+
else
26+
subdir = contrib/pg_hint_plan
27+
top_builddir = ../..
28+
include $(top_builddir)/src/Makefile.global
29+
include $(top_srcdir)/contrib/contrib-global.mk
30+
override CFLAGS += -I$(top_srcdir)/src/pl/plpgsql/src
31+
REGRESS = init base_plan
32+
endif
33+
34+
STARBALL96 = pg_hint_plan96-$(HINTPLANVER).tar.gz
35+
STARBALLS = $(STARBALL96)
36+
37+
TARSOURCES = Makefile *.c *.h COPYRIGHT* \
38+
pg_hint_plan--*.sql \
39+
pg_hint_plan.control \
40+
doc/* expected/*.out sql/*.sql sql/maskout.sh \
41+
data/data.csv input/*.source output/*.source SPECS/*.spec
42+
43+
installcheck: $(REGRESSION_EXPECTED)
44+
45+
rpms: rpm96
46+
47+
# pg_hint_plan.c includes core.c and make_join_rel.c
48+
pg_hint_plan.o: core.c make_join_rel.c # pg_stat_statements.c
49+
50+
$(STARBALLS): $(TARSOURCES)
51+
if [ -h $(subst .tar.gz,,$@) ]; then rm $(subst .tar.gz,,$@); fi
52+
if [ -e $(subst .tar.gz,,$@) ]; then \
53+
echo "$(subst .tar.gz,,$@) is not a symlink. Stop."; \
54+
exit 1; \
55+
fi
56+
ln -s . $(subst .tar.gz,,$@)
57+
tar -chzf $@ $(addprefix $(subst .tar.gz,,$@)/, $^)
58+
rm $(subst .tar.gz,,$@)
59+
60+
rpm96: $(STARBALL96)
61+
MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_hint_plan96.spec
62+
63+

0 commit comments

Comments
 (0)