Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0c4de5d

Browse files
committed
Merge branch 'PGPROEE9_6' into PGPROEE9_6_sha2_scram_port_v3_task_CORE-416
2 parents8cc2c22 +f7389cd commit0c4de5d

File tree

359 files changed

+22815
-3019
lines changed

Some content is hidden

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

359 files changed

+22815
-3019
lines changed

‎.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,9 @@ lib*.pc
3838
/Debug/
3939
/Release/
4040
/tmp_install/
41+
42+
# Contrib
43+
/contrib/*/log/
44+
/contrib/*/results/
45+
/contrib/*/tmp_check/
46+
/contrib/pg_query_state/isolation_output/

‎.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-devjade libzstd0 libzstd-dev
18+
-apt-get update && apt-get install -ysudogcc make flex bison libreadline-dev zlib1g-devopenjade 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 -cmake 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: 86 additions & 1 deletion
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:
@@ -2751,7 +2754,7 @@ else
27512754
fi
27522755

27532756

2754-
PGPRO_VERSION="$PACKAGE_VERSION.1"
2757+
PGPRO_VERSION="$PACKAGE_VERSION.2"
27552758
PGPRO_PACKAGE_NAME="PostgresPro"
27562759
PGPRO_EDITION="enterprise"
27572760

@@ -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: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ AC_DEFINE_UNQUOTED(PG_MAJORVERSION, "$PG_MAJORVERSION", [PostgreSQL major versio
3838
PGAC_ARG_REQ(with, extra-version, [STRING], [append STRING to version],
3939
[PG_VERSION="$PACKAGE_VERSION$withval"],
4040
[PG_VERSION="$PACKAGE_VERSION"])
41-
PGPRO_VERSION="$PACKAGE_VERSION.1"
41+
PGPRO_VERSION="$PACKAGE_VERSION.2"
4242
PGPRO_PACKAGE_NAME="PostgresPro"
4343
PGPRO_EDITION="enterprise"
4444
AC_SUBST(PGPRO_PACKAGE_NAME)
@@ -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: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,15 @@ SUBDIRS = \
6060
pg_variables\
6161
jsquery\
6262
sr_plan\
63-
pg_arman\
63+
pg_probackup\
6464
pg_pathman\
6565
shared_ispell\
66-
pg_hint_plan
66+
vacuumlo\
67+
pg_hint_plan\
68+
fulleq\
69+
fasttrun\
70+
online_analyze\
71+
plantuner
6772

6873
ifeq ($(with_openssl),yes)
6974
SUBDIRS += sslinfo
@@ -101,6 +106,12 @@ else
101106
ALWAYS_SUBDIRS += hstore_plpython ltree_plpython
102107
endif
103108

109+
ifeq ($(with_icu),yes)
110+
SUBDIRS += mchar
111+
else
112+
ALWAYS_SUBDIRS += mchar
113+
endif
114+
104115
# Missing:
105116
#start-scripts\ (does not have a makefile)
106117

‎contrib/fasttrun/Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
MODULE_big = fasttrun
2+
OBJS = fasttrun.o$(WIN32RES)
3+
EXTENSION = fasttrun
4+
DATA = fasttrun--1.0.sql
5+
DOCS = README.fasttrun
6+
REGRESS = fasttrun
7+
PGFIELDDESC = "fasttrun - functions to truncates the temporary table and doesn't grow pg_class size."
8+
9+
ifdefUSE_PGXS
10+
PGXS :=$(shell pg_config --pgxs)
11+
include$(PGXS)
12+
else
13+
subdir = contrib/fasttrun
14+
top_builddir = ../..
15+
include$(top_builddir)/src/Makefile.global
16+
include$(top_srcdir)/contrib/contrib-global.mk
17+
endif

‎contrib/fasttrun/README.fasttrun

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
select fasttruncate('TABLE_NAME');
2+
3+
Function truncates the temporary table and doesn't grow
4+
pg_class size.
5+
6+
Warning: function isn't transaction safe!
7+
8+
For tests:
9+
create or replace function f() returns void as $$
10+
begin
11+
for i in 1..1000
12+
loop
13+
PERFORM fasttruncate('tt1');
14+
end loop;
15+
end;
16+
$$ language plpgsql;
17+
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
CREATE EXTENSION fasttrun;
2+
create table persist ( a int );
3+
insert into persist values (1);
4+
select fasttruncate('persist');
5+
ERROR: Relation isn't a temporary table
6+
insert into persist values (2);
7+
select * from persist order by a;
8+
a
9+
---
10+
1
11+
2
12+
(2 rows)
13+
14+
create temp table temp1 (a int);
15+
insert into temp1 values (1);
16+
BEGIN;
17+
create temp table temp2 (a int);
18+
insert into temp2 values (1);
19+
select * from temp1 order by a;
20+
a
21+
---
22+
1
23+
(1 row)
24+
25+
select * from temp2 order by a;
26+
a
27+
---
28+
1
29+
(1 row)
30+
31+
insert into temp1 (select * from generate_series(1,10000));
32+
insert into temp2 (select * from generate_series(1,11000));
33+
analyze temp2;
34+
select relname, relpages>0, reltuples>0 from pg_class where relname in ('temp1', 'temp2') order by relname;
35+
relname | ?column? | ?column?
36+
---------+----------+----------
37+
temp1 | f | f
38+
temp2 | t | t
39+
(2 rows)
40+
41+
select fasttruncate('temp1');
42+
fasttruncate
43+
--------------
44+
45+
(1 row)
46+
47+
select fasttruncate('temp2');
48+
fasttruncate
49+
--------------
50+
51+
(1 row)
52+
53+
insert into temp1 values (-2);
54+
insert into temp2 values (-2);
55+
select * from temp1 order by a;
56+
a
57+
----
58+
-2
59+
(1 row)
60+
61+
select * from temp2 order by a;
62+
a
63+
----
64+
-2
65+
(1 row)
66+
67+
COMMIT;
68+
select * from temp1 order by a;
69+
a
70+
----
71+
-2
72+
(1 row)
73+
74+
select * from temp2 order by a;
75+
a
76+
----
77+
-2
78+
(1 row)
79+
80+
select relname, relpages>0, reltuples>0 from pg_class where relname in ('temp1', 'temp2') order by relname;
81+
relname | ?column? | ?column?
82+
---------+----------+----------
83+
temp1 | f | f
84+
temp2 | f | f
85+
(2 rows)
86+
87+
select fasttruncate('temp1');
88+
fasttruncate
89+
--------------
90+
91+
(1 row)
92+
93+
select fasttruncate('temp2');
94+
fasttruncate
95+
--------------
96+
97+
(1 row)
98+
99+
select * from temp1 order by a;
100+
a
101+
---
102+
(0 rows)
103+
104+
select * from temp2 order by a;
105+
a
106+
---
107+
(0 rows)
108+
109+
select relname, relpages>0, reltuples>0 from pg_class where relname in ('temp1', 'temp2') order by relname;
110+
relname | ?column? | ?column?
111+
---------+----------+----------
112+
temp1 | f | f
113+
temp2 | f | f
114+
(2 rows)
115+

‎contrib/fasttrun/fasttrun--1.0.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CREATE OR REPLACEFUNCTIONfasttruncate(text)
2+
RETURNS voidAS'MODULE_PATHNAME'
3+
LANGUAGE C RETURNSNULLONNULL INPUT VOLATILE;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp