readysettech / readyset

Readyset is a MySQL and Postgres wire-compatible caching layer that sits in front of existing databases to speed up queries and horizontally scale read throughput. Under the hood, ReadySet caches the results of cached select statements and incrementally updates these results over time as the underlying data changes.
https://readyset.io
Other
4.43k stars 122 forks source link

Warn if we need to set REPLICA IDENTITY FULL #568

Open lukoktonos opened 1 year ago

lukoktonos commented 1 year ago

Description

We currently set REPLICA IDENTITY FULL for tables that don't have primary keys to allow those tables to support updates and deletes since we rely on logical replication. This is a workaround and could have performance implications--the better thing to do is modify the table to set a primary key or REPLICA IDENTITY USING INDEX if there is a non-primary key unique index available. We should emit warnings (in readyset, if we did it during snapshotting, and in postgres, if we did it as a part of our event trigger handling) explaining that we are doing this and recommending the more optimal approach

Change in user-visible behavior

yes

Requires documentation change

yes

gvsg-rs commented 1 year ago

@aglover - requires PM input on the right user experience.