Re: [HACKERS] If subscription to foreign table valid ?

Поиск
Список
Период
Сортировка
От Neha Khatri
Тема Re: [HACKERS] If subscription to foreign table valid ?
Дата
Msg-id CAFO0U+-XxEjQp2m27kY7rey2gKSqxFdtm+LZVuT3NQasRuaDWQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] If subscription to foreign table valid ?  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Ответы Re: [HACKERS] If subscription to foreign table valid ?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers


On Fri, May 12, 2017 at 11:58 PM, Petr Jelinek <petr.jelinek@2ndquadrant.com> wrote:
On 11/05/17 15:43, Petr Jelinek wrote:
> Hi,

>
> We do check for this, but only during replication which we have to do
> because the fact that relation 't' was foreign table during ALTER
> SUBSCRIPTION does not mean that it won't be something else half hour later.
>
> I think it does make sense to add check for this into CREATE/ALTER
> SUBSCRIBER though so that user is informed immediately about the mistake
> rather than by errors in the logs later.
>
> I'll look into writing patch for this. I don't think it's beta blocker
> though.
>

So I moved the relkind check to single function and call it from all the
necessary places. See the attached


With this patch the error will be like this:

  logical replication target relation public.t is not a table

But it is possible that the referred table is Foreign Table of Partitioned table (so actually the referred object is indeed a table).
Would it make sense to specify in the message that the table is not a normal table or something in that line? 

Regards,
Neha

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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression
Следующее
От: Noah Misch
Дата:
Сообщение: Re: [HACKERS] Removal of plaintext password type references