Re: Possible bug in vacuum redo

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Vadim Mikheev <vmikheev(at)sectorbase(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Possible bug in vacuum redo
Date: 2001-12-23 22:24:22
Message-ID: 3C265996.9050909@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

FWIW, I got the following deadlock-like situation by simply running
pgbench :

968 ? S 0:00 /usr/bin/postmaster -D /var/lib/pgsql/data
13245 pts/1 S 0:00 su - postsql
31671 pts/1 S 0:00 bin/postmaster
31672 pts/1 S 0:00 postgres: stats buffer process
31674 pts/1 S 0:00 postgres: stats collector process
32606 pts/1 S 0:02 pgbench -p 7204 -t 128 -c 32 postsql
32613 pts/1 S 0:01 postgres: postsql postsql [local] UPDATE
32615 pts/1 S 0:00 postgres: postsql postsql [local] UPDATE
32616 pts/1 S 0:01 postgres: postsql postsql [local] UPDATE
32617 pts/1 S 0:00 postgres: postsql postsql [local] UPDATE
32618 pts/1 S 0:00 postgres: postsql postsql [local] UPDATE
32623 pts/1 S 0:01 postgres: postsql postsql [local] UPDATE
32624 pts/1 S 0:01 postgres: postsql postsql [local] idle in
transaction
32628 pts/1 S 0:01 postgres: postsql postsql [local] UPDATE
32633 pts/1 S 0:00 postgres: postsql postsql [local] idle
32634 pts/1 S 0:00 postgres: postsql postsql [local] UPDATE
32635 pts/1 S 0:00 postgres: postsql postsql [local] COMMIT
32636 pts/1 S 0:01 postgres: postsql postsql [local] UPDATE waiting
32637 pts/1 S 0:00 postgres: postsql postsql [local] UPDATE
32638 pts/1 S 0:00 postgres: postsql postsql [local] UPDATE
32639 pts/1 S 0:00 postgres: postsql postsql [local] UPDATE
32640 pts/1 S 0:00 postgres: checkpoint subprocess
32692 pts/2 S 0:00 su - postsql
32752 pts/2 S 0:00 grep post

It is probably some bug in pgbench, but could also be something more
serious.

I was running pgbench using modified (to use vacuum full between runs)
Tatsuos
bench script on a uniprocessor Athlon 850.:

[postsql(at)taru bench]$ cat bench.sh
#! /bin/sh
for i in 1 2 3 4 5 6 7 8
do
# pg_ctl stop
# pg_ctl -w -o '-c "wal_sync_method=fdatasync" -S' start
# pg_ctl -w start
sh mpgbench| tee bench.res.$i |
sh extract.sh > bench.data.$i
done
[postsql(at)taru bench]$ cat mpgbench
#! /bin/sh
DB=postsql
PORT=7204

#pgbench -p $PORT -i -s 128 $DB
#pgbench -p $PORT -i -s 10 $DB
#pgbench -p $PORT -i -s 1 $DB

for i in 1 2 4 8 16 32 64 128
do
# t=$(echo "scale=0; 512/$i" | bc -l)
t=$(echo "scale=0; 4096/$i" | bc -l)
echo $i concurrent users... 1>&2
echo $t transactions each... 1>&2
pgbench -p $PORT -t $t -c $i $DB
psql -p $PORT -c 'vacuum full' $DB
psql -p $PORT -c 'checkpoint' $DB
echo "===== sync ======" 1>&2
sync;sync;sync;sleep 10
echo "===== sync done ======" 1>&2
done

[postsql(at)taru bench]$ cat extract.sh
#! /bin/sh
sed -n -e '/^number of clients.*'/p \
-e '/.*excluding connections establishing.*'/p |
sed -e 's/number of clients: //' \
-e 's/^tps = //' \
-e 's/(excluding connections establishing)//'|
while read i
do
echo -n "$i "
read j
echo $j
done

-------------------
Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2001-12-24 00:09:03 Re: Possible bug in vacuum redo
Previous Message Peter Eisentraut 2001-12-23 18:16:13 Re: -lperl not checked