-- -- src/test/performance/cfs/pgbench_readwrite.sql -- -- Custom pgbench script: short read/write transaction that updates a random -- row's payload. Each UPDATE rewrites a CFS page, producing a new compressed -- record in the .cfp and leaving the previous record as dead space -- exactly -- the workload the background compactor reclaims. -- -- pgbench -n -c -j -T \ -- -f pgbench_readwrite.sql -D scale=1000 \set id random(1, :scale) \set len random(1, 16) BEGIN; UPDATE :table SET payload = repeat(md5(:id::text), :len) WHERE id = :id; SELECT payload FROM :table WHERE id = :id; COMMIT;