fix(state): PostgreSQL state created before Template bootstrap deferral is refused as schema drift (#197425) * fix(state): admit PostgreSQL schema-39 stores sealed before bootstrap_deferred openclaw/openclaw#196392 added workspace_setup_state.bootstrap_deferred to the eager schema-39 PostgreSQL DDL without a version step, so every store sealed before it is refused as drift, including update preflight (openclaw/openclaw#196966). Declare the column as a same-version PostgreSQL additive column. A writable admission verifies the exact predecessor DDL, adds the generated bigint column and reseals in one transaction. Inspection accepts either exact shape without writing. Any other difference is still refused. The workspace worker no longer adds an INTEGER column on PostgreSQL. Credit to etzelm, who diagnosed the same failure in openclaw/openclaw#197010 (https://github.com/openclaw/openclaw/pull/197010). That PR fixes it with a schema-40 step accepting both schema-39 shapes. This change keeps schema 39 instead. Stores it completes have the column-present shape that the schema-40 step accepts. Signed-off-by: Chris Eckert <christopher.k.eckert@gmail.com> * fix(state): complete retained PostgreSQL predecessor facts for writers An inspection admission retains a schema-39 predecessor's catalog as found. A writable admission that reused those shared facts skipped the bootstrap_deferred completion, so its first setup write failed with column "bootstrap_deferred" does not exist. A writer now completes the predecessor before using retained facts that lack a declared additive column. Read the additive column name through a type guard instead of an unchecked cast. Signed-off-by: Chris Eckert <christopher.k.eckert@gmail.com> * docs(state): separate PostgreSQL downgrade refusal from SQLite compatibility Older builds ignore bootstrap_deferred only on SQLite. On PostgreSQL a build that predates the column refuses a completed store as drift and needs the matching schema and anchor from before the upgrade. Signed-off-by: Chris Eckert <christopher.k.eckert@gmail.com> * test(state): rebuild workspace setup table for pre-v39 PostgreSQL fixtures --------- Signed-off-by: Chris Eckert <christopher.k.eckert@gmail.com> Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
fix(state): PostgreSQL state created before Template bootstrap deferr…
Find Your Interest
- fix(config): prevent PostgreSQL startup failure during backup recover…
- fix(postgres): chat history slows under concurrent reads (#190129)
- fix: port transcript search to PostgreSQL in batches instead of one q…
- fix(voice): Discord controls and phone consults fail with PostgreSQL …
- fix(update): supervised PostgreSQL updates ignore server recovery cap…
- improve: verify PostgreSQL plugin completion cancellation and cleanup…
- test(agents): qualify PostgreSQL completion auth health (#200991)
- PostgreSQL patches 52 security holes, sends version 14 into retirement
- CloudNativePG becomes a CNCF Incubating Project
- Don't bet on SELECT's order: shuffle your rows and see what folds





