Skip to content

Commit 110b8a6

Browse files
author
Your Name
committed
Add test scripts
1 parent 145aa5e commit 110b8a6

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed

pgb.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
INSTDIR=`pwd`/tmp_install
4+
export LD_LIBRARY_PATH=$INSTDIR/lib:$LD_LIBRARY_PATH
5+
export PATH=$INSTDIR/bin:$PATH
6+
7+
pkill -U `whoami` -9 -e postgres
8+
pkill -U `whoami` -9 -e pgbench
9+
10+
M=`pwd`/PGDATA
11+
U=`whoami`
12+
13+
rm -rf $M || true
14+
mkdir $M
15+
16+
rm -rf logfile.log || true
17+
18+
mk
19+
initdb -D $M
20+
21+
#echo "work_mem = 2GB" >> $M/postgresql.conf
22+
#echo "shared_buffers = 2GB" >> $M/postgresql.conf
23+
pg_ctl -w -D $M -l logfile.log start
24+
createdb $U
25+
pgbench -i -s 300
26+
pgbench -T 60 -c 15 -j 15 -P 5 --select-only -n $U
27+

pgb_fdw.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# ##############################################################################
4+
#
5+
# Use pgbench to scale OLTP load with FDW + partitioning machinery
6+
#
7+
# ##############################################################################
8+
9+
PGINSTALL=`pwd`/tmp_install/
10+
11+
export LD_LIBRARY_PATH=$PGINSTALL/lib:$LD_LIBRARY_PATH
12+
export PATH=$PGINSTALL/bin:$PATH
13+
14+
export PGDATABASE=shardman
15+
export PGHOST=localhost
16+
export PGUSER=`whoami`
17+
18+
pgbench -p 5432 -T 60 -P 5 -c 5 -j 5 --select-only -n &
19+
pgbench -p 5433 -T 60 -P 5 -c 5 -j 5 --select-only -n &
20+
pgbench -p 5434 -T 60 -P 5 -c 5 -j 5 --select-only -n &
21+

shdep.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ initdb -D $D3 -E UTF8 --locale=C
4747
echo "shared_preload_libraries = 'postgres_fdw'" >> $D1/postgresql.conf
4848
echo "shared_preload_libraries = 'postgres_fdw'" >> $D2/postgresql.conf
4949
echo "shared_preload_libraries = 'postgres_fdw'" >> $D3/postgresql.conf
50-
echo "shared_buffers = 10GB" >> $D1/postgresql.conf
51-
echo "shared_buffers = 10GB" >> $D2/postgresql.conf
52-
echo "shared_buffers = 10GB" >> $D3/postgresql.conf
50+
#echo "shared_buffers = 10GB" >> $D1/postgresql.conf
51+
#echo "shared_buffers = 10GB" >> $D2/postgresql.conf
52+
#echo "shared_buffers = 10GB" >> $D3/postgresql.conf
5353
echo "listen_addresses = '*'" >> $D1/postgresql.conf
5454
echo "listen_addresses = '*'" >> $D2/postgresql.conf
5555
echo "listen_addresses = '*'" >> $D3/postgresql.conf

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy