While looking at an old wal2json issue, I stumbled on a scenario that a table with a deferred primary key is not updatable in logical replication. AFAICS it has been like that since the beginning of logical decoding and seems to be an oversight while designing logical decoding. I don't envision a problem with a deferred primary key in an after commit scenario. Am I missing something?
Just in case, I'm attaching a patch to fix it and also add a test to cover this scenario.