timescaledb/test/runner_isolation.sh
Jan Nidzwetzki a608d7db61 Fix race conditions during chunk (de)compression
This patch introduces a further check to compress_chunk_impl and
decompress_chunk_impl. After all locks are acquired, a check is made
to see if the chunk is still (un-)compressed. If the chunk was
(de-)compressed while waiting for the locks, the (de-)compression
operation is stopped.

In addition, the chunk locks in decompress_chunk_impl
are upgraded to AccessExclusiveLock to ensure the chunk is not deleted
while other transactions are using it.

Fixes: #4480
2022-07-05 15:13:10 +02:00

17 lines
381 B
Bash
Executable File

#!/usr/bin/env bash
#
# Wrapper for the PostgreSQL isolationtest runner. It replaces
# the chunks IDs in the output of the tests by _X_X_. So, even
# if the IDs change, the tests will not fail.
##############################################################
set -e
set -u
ISOLATIONTEST=$1
shift
$ISOLATIONTEST "$@" | \
sed -e 's!_[0-9]\{1,\}_[0-9]\{1,\}_chunk!_X_X_chunk!g'