Skip to content

Commit dd060e9

Browse files
committed
Merge branch 'PGPROEE9_6' into PGPROEE9_6_RUSDOC
2 parents 1085d88 + e4e1784 commit dd060e9

File tree

150 files changed

+8061
-3451
lines changed

Some content is hidden

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

150 files changed

+8061
-3451
lines changed

.ci/build_and_test_world

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ set -e
3535
stage configure
3636
./configure --enable-tap-tests --enable-debug --enable-cassert --enable-nls \
3737
--with-openssl --with-perl --with-tcl --with-python \
38-
--with-gssapi --with-libxml --with-libxslt --with-ldap \
38+
--with-gssapi --with-includes=/usr/include/gssglue \
39+
--with-libxml --with-libxslt --with-ldap \
3940
--with-icu --with-zstd ${TCLCONFIG:+--with-tclconfig=${TCLCONFIG}}
4041
stage make
4142
make

.ci/make_test_base

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def prepare_extlist(value):
1919
if "pg_pathman" in l:
2020
# remove duplicates and reorder extension list to move pg_pathman to tail
2121
nl = sorted(list(set(l)), cmp = lambda a,b: 1 if a=="pg_pathman" else -1)
22-
new_value = "'{}'".format(",".join(nl))
22+
new_value = "'{0}'".format(",".join(nl))
2323
return new_value
2424
else:
2525
return value

.ci/run

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ if [ "`id -un`" = "root" ]; then
1717
else
1818
groupadd ci
1919
useradd -g ci ci
20-
chown -R ci:ci .
20+
# chown -R ci:ci .
21+
find . -type d -exec chown ci:ci {} +
2122
fi
2223
su ci -c ./.ci/build_and_test_world
2324
else

.ci/run.cmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
@echo off
22
PATH=C:\Windows\system32;C:\Perl64\bin;C:\Program Files\Git\cmd;C:\msys64\usr\bin
33

4+
REM Copy source-repo to CI temporary catalog
5+
cp -r postgrespro/* .
6+
47
IF "%ARCH%"=="" SET ARCH=X86
58
IF "%ARCH%"=="x86" SET ARCH=X86
69
IF "%ARCH%"=="x64" SET ARCH=X64
710
IF "%ARCH%"=="amd64" SET ARCH=X64
11+
IF "%ARCH%"=="AMD64" SET ARCH=X64
812
IF "%SDK%"=="" SET SDK=SDK71
913

1014
echo BUILD_ID=%BUILD_ID%

.ci/run_install_check

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ make install prefix=`pwd`/tmp_install -C contrib
2222

2323
# Setup an environment
2424
LD_LIBRARY_PATH=$(pwd)/tmp_install/lib
25+
DYLD_LIBRARY_PATH=$(pwd)/tmp_install/lib
2526
PATH=$(pwd)/tmp_install/bin:${PATH}
2627
PGDATA=$(pwd)/tmp_base
27-
export LD_LIBRARY_PATH PATH PG_DATA
28+
export DYLD_LIBRARY_PATH LD_LIBRARY_PATH PATH PG_DATA
2829

2930
# create installation
3031
PGPORT=`./.ci/find_free_port 5432`

configure

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,7 +2770,7 @@ else
27702770
fi
27712771

27722772

2773-
PGPRO_VERSION="$PACKAGE_VERSION.1"
2773+
PGPRO_VERSION="$PACKAGE_VERSION.2"
27742774
PGPRO_PACKAGE_NAME="PostgresPro"
27752775
PGPRO_EDITION="enterprise"
27762776

@@ -16078,24 +16078,6 @@ cat >>confdefs.h <<_ACEOF
1607816078
_ACEOF
1607916079

1608016080

16081-
16082-
if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
16083-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16084-
/* end confdefs.h. */
16085-
16086-
#define INT64CONST(x) x##LL
16087-
long long int foo = INT64CONST(0x1234567890123456);
16088-
16089-
_ACEOF
16090-
if ac_fn_c_try_compile "$LINENO"; then :
16091-
16092-
$as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
16093-
16094-
fi
16095-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16096-
fi
16097-
16098-
1609916081
# If we found "long int" is 64 bits, assume snprintf handles it. If
1610016082
# we found we need to use "long long int", better check. We cope with
1610116083
# snprintfs that use %lld, %qd, or %I64d as the format. If none of these

configure.in

Lines changed: 1 addition & 13 deletions
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)
@@ -1877,18 +1877,6 @@ fi
18771877
AC_DEFINE_UNQUOTED(PG_INT64_TYPE, $pg_int64_type,
18781878
[Define to the name of a signed 64-bit integer type.])
18791879

1880-
dnl If we need to use "long long int", figure out whether nnnLL notation works.
1881-
1882-
if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
1883-
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
1884-
#define INT64CONST(x) x##LL
1885-
long long int foo = INT64CONST(0x1234567890123456);
1886-
])],
1887-
[AC_DEFINE(HAVE_LL_CONSTANTS, 1, [Define to 1 if constants of type 'long long int' should have the suffix LL.])],
1888-
[])
1889-
fi
1890-
1891-
18921880
# If we found "long int" is 64 bits, assume snprintf handles it. If
18931881
# we found we need to use "long long int", better check. We cope with
18941882
# snprintfs that use %lld, %qd, or %I64d as the format. If none of these

contrib/aqo/aqo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
*/
109109
#ifndef __ML_CARD_H__
110110
#define __ML_CARD_H__
111-
111+
#include <math.h>
112112
#include "postgres.h"
113113

114114
#include "fmgr.h"

contrib/aqo/hash.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ get_fss_for_object(List *clauselist, List *selectivities, List *relidslist,
118118
i = 0;
119119
foreach(l, selectivities)
120120
{
121-
(*features)[inverse_idx[i]] = fmax(log_selectivity_lower_bound,
122-
log(*((double *) (lfirst(l)))));
121+
(*features)[inverse_idx[i]] = log(*((double *) (lfirst(l))));
122+
if ((*features)[inverse_idx[i]] < log_selectivity_lower_bound)
123+
(*features)[inverse_idx[i]] = log_selectivity_lower_bound;
123124
sorted_clauses[inverse_idx[i]] = clause_hashes[i];
124125
i++;
125126
}

contrib/aqo/preprocessing.c

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,21 @@ aqo_planner(Query *parse,
163163
aqo_mode);
164164
break;
165165
}
166+
if (RecoveryInProgress())
167+
{
168+
if (aqo_mode == AQO_MODE_FORCED)
169+
{
170+
adding_query = false;
171+
learn_aqo = false;
172+
auto_tuning = false;
173+
collect_stat = false;
174+
}
175+
else
176+
{
177+
disable_aqo_for_query();
178+
return call_default_planner(parse, cursorOptions, boundParams);
179+
}
180+
}
166181
if (adding_query)
167182
{
168183
add_query(query_hash, learn_aqo, use_aqo, fspace_hash, auto_tuning);
@@ -177,8 +192,14 @@ aqo_planner(Query *parse,
177192
fspace_hash = DatumGetInt32(query_params[3]);
178193
auto_tuning = DatumGetBool(query_params[4]);
179194
collect_stat = learn_aqo || use_aqo || auto_tuning;
180-
if (!collect_stat)
195+
if (!learn_aqo && !use_aqo && !auto_tuning)
181196
add_deactivated_query(query_hash);
197+
if (RecoveryInProgress())
198+
{
199+
learn_aqo = false;
200+
auto_tuning = false;
201+
collect_stat = false;
202+
}
182203
}
183204
explain_aqo = use_aqo;
184205

0 commit comments

Comments
 (0)