You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means it is now possible to use generated columns in PowerSync, with no further modifications required. However, we should:
Document the flag, perhaps even recommending it for all users when creating the publication.
Add a check when replicating tables with generated columns, to confirm that Postgres 18 is used and the flag is configured; logging a warning otherwise.
Re-check behavior of REPLICA IDENTITY FULL when using generated columns. This currently causes consistency issues when the above flag is not set. This could be solved by changing our internal replica identity to use the primary key rather than the entire row, if available. See [Postgres] Use primary key for REPLICA IDENTITY FULL tables #397 for details
Since Postgres 18, generated columns can be used by configuring a flag on the publication:
https://www.postgresql.org/docs/current/sql-createpublication.html#SQL-CREATEPUBLICATION-PARAMS-WITH-PUBLISH-GENERATED-COLUMNS
This means it is now possible to use generated columns in PowerSync, with no further modifications required. However, we should: