Using CDC Based replication on a Postgres source w...
# ask-ai
h
Using CDC Based replication on a Postgres source with tables that dont have primary key, can i run sync mode “Incremental, Append + Deduped” if the table is configure with REPLICA IDENTITY FULL?
u
Based on the information provided in the knowledge sources, I'm afraid I don't have enough information to definitively answer your specific question about using "Incremental, Append + Deduped" sync mode with CDC-based replication on Postgres tables without primary keys but with REPLICA IDENTITY FULL. However, I can provide some relevant information about CDC replication and table requirements in Airbyte: 1. For CDC-based replication in Postgres, tables typically need to have primary keys. As stated in the [Airbyte documentation](https://docs.airbyte.com/integrations/sources/postgres/postgres-troubleshooting#cdc-requirements): "Incremental sync is only supported for tables with primary keys. For tables without primary keys, use Full Refresh sync." 2. The [Airbyte documentation](https://docs.airbyte.com/integrations/sources/postgres#step-5-create-publication-and-replication-identities-for-each-postgres-table) mentions that REPLICA IDENTITY FULL can be used in rare cases: "In rare cases, if your tables use data types that support TOAST or have very large field values, consider instead using replica identity type full:
ALTER TABLE tbl1 REPLICA IDENTITY FULL;
." 3. However, the documentation doesn't explicitly state whether this allows for incremental syncs on tables without primary keys. 4. It's worth noting that the "Incremental | Append + Deduped" sync mode typically requires a primary key for deduplication, as mentioned in [this Airbyte tutorial](https://airbyte.com/tutorials/incremental-data-synchronization#step-2): "A primary key field is used by Airbyte to select only the most recent version of a given record from the history table for inclusion in the final deduplicated table." Given these points, it seems unlikely that you can use "Incremental, Append + Deduped" sync mode with tables that don't have primary keys, even with REPLICA IDENTITY FULL. However, to get a definitive answer, you may want to reach out to Airbyte support or try testing it in your specific setup.