\set id random_zipfian(1, 5000000, 2.5)
\set read_id random(1, 5000000)
\set val random(1, 1000)

BEGIN;
  UPDATE stress_victim SET balance = :val WHERE id = :id;

  UPDATE stress_shadow SET balance = :val WHERE id = :id;
  
  DELETE FROM stress_victim WHERE id = :id + 1;
  DELETE FROM stress_shadow WHERE id = :id + 1;
  
  INSERT INTO stress_victim (id, balance, payload) 
  VALUES (:id + 1, :val, 'new')
  ON CONFLICT (id) DO UPDATE SET balance = EXCLUDED.balance, payload = EXCLUDED.payload;
  
  INSERT INTO stress_shadow (id, balance, payload) 
  VALUES (:id + 1, :val, 'new')
  ON CONFLICT (id) DO UPDATE SET balance = EXCLUDED.balance, payload = EXCLUDED.payload;
COMMIT;