Skip to content

fix(taskbroker): Return explicit columns instead of * from postgres updates - #861

Open
evanh wants to merge 2 commits into
mainfrom
evanh/fix/pg-disable-statement-cache
Open

evanh wants to merge 2 commits into
mainfrom
evanh/fix/pg-disable-statement-cache

Conversation

@evanh

@evanh evanh commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

sqlx by default stores all queries to postgres as prepared statements. This is normally fine, but when a migration runs all of the queries that use some form of SELECT * start to return errors. This is fixed with a restart, but caused an incident while the restart happened. Replace all the implicit * with explicit column names.

Cached RETURNING * plans fail with "cached plan must not change result type" once a migration alters
inflight_taskactivations while brokers are running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@evanh
evanh requested a review from a team as a code owner November 10, 2026 22:14

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 45bb4a8. Configure here.

Comment thread src/store/adapters/postgres.rs Resolved
…pdates

statement_cache_capacity(0) leaks a named prepared statement per query in sqlx 0.8, so name the columns
instead. A cached plan then keeps its result type when a migration adds a column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@evanh evanh changed the title fix(taskbroker): Disable the postgres prepared statement cache fix(taskbroker): Return explicit columns instead of * from postgres updates Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants