BUG #15063: Updates to temporary tables fail when there is apublication with FOR ALL TABLES - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #15063: Updates to temporary tables fail when there is apublication with FOR ALL TABLES
Date
Msg-id 151855575809.1450.11154539840290583454@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #15063: Updates to temporary tables fail when there is apublication with FOR ALL TABLES  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      15063
Logged by:          Dan Goodliffe
Email address:      dan@randomdan.homeip.net
PostgreSQL version: 10.2
Operating system:   Linux
Description:

Given a publication which uses FOR ALL TABLES, so that future tables are
included...

Create a temporary table with no keys or identity etc:
LOG:  statement: CREATE TEMPORARY TABLE tmp_masks(atomSpec text[],dateAdded
date,email text,message text,n int,person text)

Execute an update against the table, the update fails:
ERROR:  cannot update table "tmp_masks" because it does not have a replica
identity and publishes updates
HINT:  To enable updating the table, set REPLICA IDENTITY using ALTER
TABLE.
STATEMENT:  UPDATE tmp_masks SET dateadded = dateadded + INTERVAL '1000
years'  WHERE dateadded < '1400-01-01'

(yes, the SQL is a hack to fix typos)

I'm not sure if the temporary table has been added to the publication (which
isn't supported) or if the presence of the FOR ALL TABLES publication alone
(without the table being added to it) is enough to trigger the problem.

I can provide more debug/details etc if required given an idea of what's
needed and how to get it.

Thanks.


pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: 答复: response time is very longin PG9.5.5 using psql or jdbc
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #15063: Updates to temporary tables fail when there is apublication with FOR ALL TABLES