Requiring temp tables to have replication identity defined

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Requiring temp tables to have replication identity defined
Date: 2019-03-13 20:26:51
Message-ID: CAHOFxGr=mqPZXbAuoR7Nbq-bU4HxqVWHbTTUy5=PKQut_F0=XA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

/* select version();
PostgreSQL 10.6 (Ubuntu 10.6-1.pgdg18.04+1) on x86_64-pc-linux-gnu,
compiled by gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0, 64-bit */

To reproduce, try the below code. Uncomment the alter table line and the
error is gone as expected. I would expect the identity should not be need
to be defined on a temp table since it won't be replicated anyway.

BEGIN;
CREATE publication test1 FOR ALL TABLES;
CREATE TEMP TABLE testing123 ON COMMIT DROP AS ( SELECT 1 AS value );
/* ALTER TABLE pg_temp.testing123 REPLICA IDENTITY FULL; */
UPDATE testing123 SET value = 2;

/*OUTPUT:
ERROR: cannot update table "testing123" because it does not have a replica
identity and publishes updates */
ROLLBACK;

*Michael Lewis | Software Engineer*
*Entrata*

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2019-03-14 00:04:41 Re: pg_rewind : feature to rewind promoted standby is broken!
Previous Message PG Bug reporting form 2019-03-13 19:11:32 BUG #15693: Suggestion on libpq memory management