pgpool2.git / summary / log / commit / refs
commit cccdf57c6ba75e5ac12b3ecf12bc1aeee27b3d29
Author: Tatsuo Ishii <ishii@sraoss.co.jp>
Date: Mon May 22 07:27:40 2023 +0000
Test: fix occasional 069.memory_leak_extended test failure.
It turned out that reason of the occasional test failure is, pgpool
child process is gone before running ps command after pgbench
finishes. The cause is a kind mismatch FATAL error, "DISCARD ALL
cannot be executed within a pipeline". To fix this, run pgbench in
background and get the process size before pgbench finishes.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-May/004338.html
.../regression/tests/069.memory_leak_extended/test.sh | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/test/regression/tests/069.memory_leak_extended/test.sh b/src/test/regression/tests/069.memory_leak_extended/test.sh
index 975becbec..87802608f 100755
--- a/src/test/regression/tests/069.memory_leak_extended/test.sh
+++ b/src/test/regression/tests/069.memory_leak_extended/test.sh
@@ -43,14 +43,25 @@ do
init_size=`ps l $pid|tail -1|awk '{print $7}'`
echo "init_size: $init_size"
- # run pgbench for a while
- $PGBENCH -M extended -S -T 30 test
+ # run pgbench for a while in background.
+ echo "Starting pgbench in background"
+ date
+ $PGBENCH -M extended -S -T 30 test &
+ # sleep 29 seconds so that we can get the process size before
+ # pgpool process $pid accidentaly exits.
+ sleep 29
+
+ date
after_size=`ps l $pid|tail -1|awk '{print $7}'`
delta=`expr $after_size - $init_size`
echo "initial process size: $init_size after size: $after_size delta: $delta"
+ wait
+ echo "pgbench done."
+ date
+
test $delta -eq 0
if [ $? != 0 ];then
[parent: 66fa78e2b5b9]