Re: Creation of temporary tables on a publisher

Поиск
Список
Период
Сортировка
От Cory Nemelka
Тема Re: Creation of temporary tables on a publisher
Дата
Msg-id CAMe5Gn0ugLAjCJj3=-aEgT27F1_q68S1Jytwyzxm4fG9jFQSeg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Creation of temporary tables on a publisher  (Shreeyansh Dba <shreeyansh2014@gmail.com>)
Ответы Re: Creation of temporary tables on a publisher  (Shreeyansh Dba <shreeyansh2014@gmail.com>)
Список pgsql-admin
The issue is the apparent replication of temporary tables.  The workarounds you proposed do work but why do postgresql publications replicate temporary tables?  they will not be on the subscriber so the replication will fail.  

As I mentioned, is this expected behavior?

--cnemelka


On Wed, Jan 23, 2019 at 6:58 PM Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:
In Logical replication all tables have a valid default REPLICA IDENTITY (i.e. PK). If suppose there isn't one then You could try to set identity to full, with will use whole row as identifier ALTER TABLE name REPLICA IDENTITY FULL;

or if it has unique index ALTER TABLE name USING INDEX index_name;

Thanks & Regards,
Shreeyansh DBA Team
www.shreeyansh.com


On Thu, Jan 24, 2019 at 4:16 AM Cory Nemelka <cnemelka@gmail.com> wrote:
Postgresql v10.6

After defining a publication with "FOR ALL TABLES" clause, temporary tables that are created after the definition will produce errors if they are updated,etc.  The error: "cannot update table <tablename> because it does not have a replica identity and publishes updates."

Is this expected behaviour?  I had understood that temporary tables were not included in publications.


--cnemelka

В списке pgsql-admin по дате отправления:

Предыдущее
От: Shreeyansh Dba
Дата:
Сообщение: Re: constraint deferred but fails?
Следующее
От: Pepe TD Vo
Дата:
Сообщение: Re: ora2pg perl module error