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.
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
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 approachChange in user-visible behavior
yes
Requires documentation change
yes