Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ master ]

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
build:
Expand All @@ -17,19 +17,21 @@ jobs:
steps:
- name: pg
run: |
sudo apt install libipc-run-perl
echo "Deploying to production server on branch" $BRANCH_NAME
git config --global user.email "ci@postgrespro.ru"
git config --global user.name "CI PgPro admin"
export COPT=-Werror
git clone https://github.com/postgres/postgres.git pg
cd pg
git checkout master
./configure --prefix=`pwd`/tmp_install CFLAGS="-O3"
./configure --prefix=`pwd`/tmp_install CFLAGS="-O3" --enable-tap-tests --enable-cassert
git clone https://github.com/postgrespro/aqo.git contrib/aqo
git -C contrib/aqo checkout $BRANCH_NAME
patch -p1 --no-backup-if-mismatch < contrib/aqo/aqo_master.patch
make -j4 > /dev/null && make -j4 -C contrib > /dev/null
env CLIENTS=50 THREADS=50 make -C contrib/aqo check

echo "Use AQO with debug code included"
git clean -fdx
git -C contrib/aqo clean -fdx
Expand Down
24 changes: 4 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,10 @@ OBJS = $(WIN32RES) \

TAP_TESTS = 1

REGRESS = aqo_disabled \
aqo_controlled \
aqo_intelligent \
aqo_forced \
aqo_learn \
schema \
aqo_fdw \
aqo_CVE-2020-14350 \
gucs \
forced_stat_collection \
unsupported \
clean_aqo_data \
parallel_workers \
plancache \
statement_timeout \
temp_tables \
top_queries \
relocatable\
look_a_like \
feature_subspace
# Use an empty dummy test to define the variable REGRESS and therefore run all
# regression tests. regress_schedule contains the full list of real tests.
REGRESS = aqo_dummy_test
REGRESS_OPTS = --schedule=$(srcdir)/regress_schedule

fdw_srcdir = $(top_srcdir)/contrib/postgres_fdw
stat_srcdir = $(top_srcdir)/contrib/pg_stat_statements
Expand Down
6 changes: 6 additions & 0 deletions auto_tuning.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ static bool is_stable(double *elems, int nelems);
static bool converged_cq(double *elems, int nelems);
static bool is_in_infinite_loop_cq(double *elems, int nelems);

static bool
not_used_function(int parameter)
{
return parameter % 2;
}


/*
* Returns mean value of the array of doubles.
Expand Down
Empty file added expected/aqo_dummy_test.out
Empty file.
22 changes: 22 additions & 0 deletions regress_schedule
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
test: aqo_disabled
test: aqo_controlled
test: aqo_intelligent
test: aqo_forced
test: aqo_learn
test: schema
test: aqo_fdw
test: aqo_CVE-2020-14350
test: gucs
test: forced_stat_collection
test: unsupported
test: clean_aqo_data
test: parallel_workers
test: plancache
# Performance-dependent test. Can be ignored if executes in containers or on slow machines
ignore: statement_timeout
test: statement_timeout
test: temp_tables
test: top_queries
test: relocatable
test: look_a_like
test: feature_subspace
Empty file added sql/aqo_dummy_test.sql
Empty file.
2 changes: 1 addition & 1 deletion t/001_pgbench.pl
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@
"SELECT sum(executions_with_aqo) FROM test.aqo_query_stat");

# 25 trans * 10 clients * 4 query classes = 1000 + unique SELECT to pgbench_branches
is($res, 1001, 'Each query should be logged in LEARN mode');
is($res, $ENV{CLIENTS}*100+1, 'Each query should be logged in LEARN mode');
$res = $node->safe_psql('postgres',
"SELECT sum(executions_without_aqo) FROM test.aqo_query_stat");
is($res, 0, 'AQO has learned on the queries - 2');
Expand Down