BUG #15063: Updates to temporary tables fail when there is a publication with FOR ALL TABLES

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: dan(at)randomdan(dot)homeip(dot)net
Subject: BUG #15063: Updates to temporary tables fail when there is a publication with FOR ALL TABLES
Date: 2018-02-13 21:02:38
Message-ID: 151855575809.1450.11154539840290583454@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15063
Logged by: Dan Goodliffe
Email address: dan(at)randomdan(dot)homeip(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2018-02-13 21:11:25 Re: BUG #15063: Updates to temporary tables fail when there is a publication with FOR ALL TABLES
Previous Message Andres Freund 2018-02-13 19:05:56 Re: 答复: response time is very long in PG9.5.5 using psql or jdbc