I'm migrating an old Postgres 12.14 database to a new one that has encrypted storage. I'm using the Postgres built-in logical replication (LR) to do this. I have a number of tables without any sort of primary key or unique index. The only type of write these tables receive are inserts. The pglogical extension has a way to handle tables like these using the "default_insert_only" replication set:
There are three preexisting replication sets named “default”, “default_insert_only” and “ddl_sql”. The “default” replication set is defined to replicate all changes to tables in. The “default_insert_only” only replicates INSERTs and is meant for tables that don’t have primary key (see Limitations section for details).
Is it unnecessary to do anything special to migrate these insert-only tables without keys? The Postgres docs on LR publications indicate that it's unnecessary to do anything special:
A published table must have a “replica identity” configured in order to be able to replicate UPDATE and DELETE operations, so that appropriate rows to update or delete can be identified on the subscriber side. By default, this is the primary key, if there is one. Another unique index (with certain additional requirements) can also be set to be the replica identity. If the table does not have any suitable key, then it can be set to replica identity “full”, which means the entire row becomes the key. This, however, is very inefficient and should only be used as a fallback if no other solution is possible. If a replica identity other than “full” is set on the publisher side, a replica identity comprising the same or fewer columns must also be set on the subscriber side. See REPLICA IDENTITY for details on how to set the replica identity. If a table without a replica identity is added to a publication that replicates UPDATE or DELETE operations then subsequent UPDATE or DELETE operations will cause an error on the publisher. INSERT operations can proceed regardless of any replica identity.
There is a mechanism in the Postgres docs for creating an insert-only publication, similar to pglogical's "default_insert_only" replication set:
CREATE PUBLICATION insert_only FOR TABLE mydata WITH (publish = 'insert');
But is it necessary to use this if you're confident that only inserts will occur?