Skip to content

Commit f98b00e

Browse files
committed
pipeline
1 parent df0a611 commit f98b00e

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

pipeline.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
resources:
3+
- name: postgresql
4+
type: git
5+
source:
6+
uri: https://github.com/postgrespro/postgres_cluster
7+
branch: ci
8+
9+
jobs:
10+
- name: runtests
11+
public: true
12+
serial: true
13+
plan:
14+
- get: postgresql
15+
- task: runtests
16+
file: postgresql/build.yml

test.sh

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
pkill -9 postgres
2+
rm -rf tmp_install
3+
make install
4+
ulimit -c unlimited
5+
6+
./tmp_install/bin/initdb -D ./tmp_install/data1
7+
8+
cat <<-CONF >> ./tmp_install/data1/pg_hba.conf
9+
local replication stas trust
10+
host replication all ::1/128 trust
11+
host all all ::1/128 trust
12+
host replication all 127.0.0.1/32 trust
13+
host all all 127.0.0.1/32 trust
14+
CONF
15+
16+
cat <<-CONF >> ./tmp_install/data1/postgresql.conf
17+
max_wal_senders = 10
18+
wal_level = logical
19+
max_prepared_transactions = 100
20+
CONF
21+
22+
./tmp_install/bin/pg_ctl -w -D ./tmp_install/data1 -l logfile start
23+
createdb -h localhost
24+
pgbench -i -h localhost
25+
26+
27+
###############################################################################
28+
29+
./tmp_install/bin/initdb -D ./tmp_install/data2
30+
31+
cat <<-CONF >> ./tmp_install/data2/pg_hba.conf
32+
local replication stas trust
33+
host replication all ::1/128 trust
34+
host all all ::1/128 trust
35+
host replication all 127.0.0.1/32 trust
36+
host all all 127.0.0.1/32 trust
37+
CONF
38+
39+
cat <<-CONF >> ./tmp_install/data2/postgresql.conf
40+
max_wal_senders = 10
41+
wal_level = logical
42+
max_prepared_transactions = 100
43+
port = 5433
44+
CONF
45+
46+
./tmp_install/bin/pg_ctl -w -D ./tmp_install/data2 -l logfile2 start
47+
createdb -h localhost -p 5433
48+
./tmp_install/bin/pg_dump -s | psql -p 5433
49+
# pgbench -i -h localhost -p 5433
50+
51+
52+
psql -c $'CREATE PUBLICATION mypub FOR TABLE pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers;'
53+
psql -c $'CREATE SUBSCRIPTION mysub CONNECTION \'dbname=stas host=127.0.0.1\' PUBLICATION mypub;' -p 5433

0 commit comments

Comments
 (0)