fix: make postgres table name configurable via pg_table_name config#568
fix: make postgres table name configurable via pg_table_name config#568
Conversation
Allow different deployments to use different PostgreSQL table names for
inflight task activations. Migrations use a {TABLE_NAME} placeholder with
runtime substitution and checksum recomputation via sha2. All queries use
format! with the configured table name. Defaults to inflight_taskactivations
for backwards compatibility.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
I don't actually know if this is better than using different databases, which we can already do without any code changes. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
What are the downsides of using multiple databases? Are they more complex to provision and maintain? |
They have different connection pools seems to be the main one. Otherwise the main limitation is that you can't query across DBs, but that is not an issue for us. |
There is an idea to have separate tables when using postgres, to isolate some of the work. Make that configurable.
pg_table_nameconfig field (defaults toinflight_taskactivationsfor backwards compatibility){TABLE_NAME}placeholder;build_migrator()substitutes the name at runtime and recomputes SHA-384 checksums sosqlxmigration tracking works correctlyPostgresActivationStoreuseformat!with the configured table name instead of a hardcoded stringsha2was already inCargo.tomlTest plan
cargo buildpassescargo test), including bothcase_1_sqliteandcase_2_postgresvariants🤖 Generated with Claude Code