Replica identity value on PostgreSQL read-only replica In PostgreSQL will the replica identity of a table in a read-only replica database be the same as the replica identity in the primary? I.e., if I run the following query on primary and replica databases will I always get the same result (assuming replication is caught up)?
SELECT CASE relreplident
          WHEN 'd' THEN 'default'
          WHEN 'n' THEN 'nothing'
          WHEN 'f' THEN 'full'
          WHEN 'i' THEN 'index'
       END AS replica_identity
FROM pg_class c
WHERE oid = 'mytable'::regclass;
The query will return the same on both servers, because streaming replication keeps them physically identical.
&quot;Replica identity&quot; is a concept from logical replication, which is something quite different.