BUG #17064: Parallel VACUUM operations cause the error "global/pg_filenode.map contains incorrect checksum"
The Post Office <noreply@postgresql.org>
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: exclusion@gmail.com
Date: 2021-06-18T15:00:01Z
Lists: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 17064
Logged by: Alexander Lakhin
Email address: exclusion@gmail.com
PostgreSQL version: 14beta1
Operating system: Ubuntu 20.04
Description:
The following script:
===
for i in `seq 100`; do
createdb db$i
done
# Based on the contents of the regression test "vacuum"
echo "
CREATE TABLE pvactst (i INT);
INSERT INTO pvactst SELECT i FROM generate_series(1,10000) i;
DELETE FROM pvactst;
VACUUM pvactst;
DROP TABLE pvactst;
VACUUM FULL pg_database;
" >/tmp/vacuum.sql
for n in `seq 10`; do
echo "iteration $n"
for i in `seq 100`; do
( { for f in `seq 100`; do cat /tmp/vacuum.sql; done } | psql -d db$i )
>psql-$i.log 2>&1 &
done
wait
grep -C5 FATAL psql*.log && break;
done
===
detects sporadic FATAL errors:
iteration 1
psql-56.log-DROP TABLE
psql-56.log-VACUUM
psql-56.log-CREATE TABLE
psql-56.log-INSERT 0 10000
psql-56.log-DELETE 10000
psql-56.log:FATAL: relation mapping file "global/pg_filenode.map" contains
incorrect checksum
psql-56.log-server closed the connection unexpectedly
psql-56.log- This probably means the server terminated abnormally
psql-56.log- before or while processing the request.
psql-56.log-connection to server was lost
(Discovered when running multiple installcheck's for a single instance.
(Except for this failure, installcheck x 100 (with several tests excluded)
is rather stable.))
Reproduced on REL9_6_STABLE .. master.
Commits
-
Another fix to relmapper race condition.
- 5956795cb5be 9.6.23 landed
- fbbc48995d05 10.18 landed
- eb3bd243a245 11.13 landed
- 8b01a403c5cc 12.8 landed
- 6fb377e5f74b 13.4 landed
- 9b8ed0f52bff 14.0 landed
-
Prevent race condition while reading relmapper file.
- 85ae8ccb2fb3 9.6.23 landed
- a5eacd86b715 10.18 landed
- c78bb32c19fe 11.13 landed
- caac1965077f 12.8 landed
- 2a0ab13f8dd1 13.4 landed
- b6d8d2073f22 14.0 landed