# chlift demo: 15 Postgres tables, 5 hot, to ClickHouse

Run on a throwaway GitHub Actions runner, 2026-10-12 20:37 UTC, chlift built from commit a403720d7b047230b55445d08ad48201589f4594.

- **Seeded:** 15 tables, 505800 rows. Hot: orders, order_items, payments, sessions, events.
- **Snapshot:** all 15 tables copied and the mirror RUNNING after 23 s.
- **Load:** pgbench, 30112 transactions in 300 s (100.372060 tx/s, average latency 15.073 ms), each one 3 inserts, 2 updates, 1 more insert and 1 delete across the hot tables.
- **Slot WAL held at most:** 14.5 MiB during the load.
- **Equal:** `migrate check --checksums` passed on all 15 tables 2 s after the load stopped.

```
ok   public.events: postgres 104171 rows; replicas map[d1:104171] 
ok   public.order_items: postgres 130112 rows; replicas map[d1:130112] 
ok   public.audit_log: postgres 50000 rows; replicas map[d1:50000] 
ok   public.payments: postgres 80112 rows; replicas map[d1:80112] 
ok   public.orders: postgres 80112 rows; replicas map[d1:80112] 
ok   public.notifications: postgres 40000 rows; replicas map[d1:40000] 
ok   public.invoices: postgres 30000 rows; replicas map[d1:30000] 
ok   public.shipments: postgres 25000 rows; replicas map[d1:25000] 
ok   public.sessions: postgres 20000 rows; replicas map[d1:20000] 
ok   public.users: postgres 20000 rows; replicas map[d1:20000] 
ok   public.reviews: postgres 8000 rows; replicas map[d1:8000] 
ok   public.carts: postgres 10000 rows; replicas map[d1:10000] 
ok   public.inventory: postgres 2000 rows; replicas map[d1:2000] 
ok   public.products: postgres 500 rows; replicas map[d1:500] 
ok   public.coupons: postgres 300 rows; replicas map[d1:300] 
checksum public.events: 64 buckets x 6 columns (count, id, user_id, kind, props, at), 0 differ
checksum public.order_items: 64 buckets x 7 columns (count, id, order_id, sku, qty, price_cents, created_at), 0 differ
checksum public.audit_log: 64 buckets x 6 columns (count, id, actor, action, detail, at), 0 differ
checksum public.payments: 64 buckets x 6 columns (count, id, order_id, amount_cents, provider, created_at), 0 differ
checksum public.orders: 64 buckets x 7 columns (count, id, user_id, status, total_cents, created_at, updated_at), 0 differ
checksum public.notifications: 64 buckets x 6 columns (count, id, user_id, channel, sent, created_at), 0 differ
checksum public.invoices: 64 buckets x 5 columns (count, id, order_id, amount_cents, issued_on), 0 differ
checksum public.shipments: 64 buckets x 6 columns (count, id, order_id, carrier, shipped_at, delivered_at), 0 differ
checksum public.sessions: 64 buckets x 6 columns (count, id, user_id, hits, ua, last_seen), 0 differ
checksum public.users: 64 buckets x 5 columns (count, id, email, country, created_at), 0 differ
checksum public.reviews: 64 buckets x 7 columns (count, id, product_id, user_id, stars, body, created_at), 0 differ
checksum public.carts: 64 buckets x 5 columns (count, id, user_id, items, created_at), 0 differ
checksum public.inventory: 64 buckets x 6 columns (count, id, product_id, warehouse, on_hand, updated_at), 0 differ
checksum public.products: 64 buckets x 7 columns (count, id, sku, name, price_cents, attrs, created_at), 0 differ
checksum public.coupons: 64 buckets x 5 columns (count, id, code, pct, valid_until), 0 differ
```

## The catch

The ClickHouse table `demo.payments` was dropped and 50 payments were written in Postgres.

- PeerDB mirror state afterwards: **RUNNING** (`chlift_mirror_up` = 1). It sends no alert for this.
- chlift exporter: `chlift_mirror_errors` 0 -> 1, 11 s after the write (polled every 10 s).
- `migrate check` exit code: 1 (non-zero = not equal).

- **Teardown:** replication slots 0, publications 0, containers left 0, clickhouse inactive.
- **Total run:** 489 s.
