On 2019/03/13 21:03, Peter Eisentraut wrote: > If a FOR ALL TABLES publication exists, unlogged tables are ignored > for publishing changes. But CheckCmdReplicaIdentity() would still > check in that case that such a table has a replica identity set before > accepting updates. That is useless, so check first whether the given > table is publishable and skip the check if not. > > Example: > > CREATE PUBLICATION pub FOR ALL TABLES; > CREATE UNLOGGED TABLE logical_replication_test AS SELECT 1 AS number; > UPDATE logical_replication_test SET number = 2; > ERROR: cannot update table "logical_replication_test" because it does > not have a replica identity and publishes updates > > Patch attached.
An email on -bugs earlier this morning complains of the same problem but for temporary tables. https://www.postgresql.org/message-id/CAHOFxGr%3DmqPZXbAuoR7Nbq-bU4HxqVWHbTTUy5%3DPKQut_F0%3DXA%40mail.gmail.com It seems your patch fixes their case too. Thanks, Amit