Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insertion into tables with generated columns causes shape termination #2251

Open
AntonOfTheWoods opened this issue Jan 24, 2025 · 1 comment

Comments

@AntonOfTheWoods
Copy link
Contributor

To reproduce, add the following main...AntonOfTheWoods:electric:generated_bug and do a normal run of the todo-app example. Any insertion (e.g, via the demo web interface) causes the following message in the log:

01:12:57.837 pid=<0.3097.0> shape_handle=91872063-1737681148357 [info] Schema for the table "public"."todos" changed - terminating shape 91872063-1737681148357

This, in turn, causes a must-revalidate on all clients and the obligatory re-syncing of the entire shape

@balegas
Copy link
Contributor

balegas commented Jan 24, 2025

Electric does not handle generated columns and seems unlikely that it will since they are skipped in logical replication https://www.postgresql.org/docs/current/ddl-generated-columns.html. We need to look into the messages in the replication stream to see if we can handle the special case.

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

No branches or pull requests

2 participants