Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

bench: the restart lane reattaches PostgreSQL with autocommit on, so its write batch is committed - #330

Merged
tae898 merged 1 commit into
mainfrom
bench/l6-postgres-reattach-autocommit
Oct 18, 2026
Merged

tae898 merged 1 commit into
mainfrom
bench/l6-postgres-reattach-autocommit

Conversation

@tae898

@tae898 tae898 commented Oct 18, 2026

Copy link
Copy Markdown

The restart lane failed PostgreSQL's documents cell on the bench host with "cycle 0's 1000 committed writes were not back 300 s after a clean stop and restart". The writes were never committed: PostgresTPC.connect() opens with autocommit off and only build() turns it on after its final commit, while Docs.reattach() builds a fresh adapter after each restart and never runs build(). So the cycle's 1,000 single-record inserts sat in one open transaction that the stop rolled back, and verify() blamed the engine.

The fix turns autocommit on in Docs.reattach() for postgres, the state build() leaves. The documents lane's adapter (l1_tpc.PostgresTPC) is not changed.

What ran:

  • The lane's own path against the pinned server (postgres 18.6 by digest, synchronous_commit=off, in dbbench:client): build's end state, reattach(), write(0), a clean docker restart, verify(0). Before: autocommit after reattach False, verify False. After: True, True.
  • test_l6_restart_reattach.py (2 tests: postgres gets autocommit, another backend is left as connect() made it).
  • The whole benchmarks/experiments suite: 850 passed, 19 skipped.

The two pass-1 PostgreSQL restart cells re-run with the fix (tpch10 picks it up on the bench host before it starts; tpch1 goes into the deferred stage).

🤖 Generated with Claude Code

…its write batch is committed

PostgresTPC.connect() opens with autocommit off and only build() turns it on; Docs.reattach() made a fresh adapter
after each restart and never ran build(), so the 1000 writes of a cycle sat in one open transaction that the stop
rolled back, and verify() failed the cell as an engine losing committed writes (qP24 on mini, 2026-10-18).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tae898
tae898 merged commit 1ab8b5d into main Oct 18, 2026
3 checks passed
@tae898
tae898 deleted the bench/l6-postgres-reattach-autocommit branch October 18, 2026 02:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant