From: | Neha Khatri <nehakhatri5(at)gmail(dot)com> |
---|---|
To: | Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com> |
Cc: | tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: If subscription to foreign table valid ? |
Date: | 2017-05-15 03:55:39 |
Message-ID: | CAFO0U+-XxEjQp2m27kY7rey2gKSqxFdtm+LZVuT3NQasRuaDWQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, May 12, 2017 at 11:58 PM, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2017-05-15 04:03:15 | Re: Removal of plaintext password type references |
Previous Message | Noah Misch | 2017-05-15 03:50:36 | Re: Concurrent ALTER SEQUENCE RESTART Regression |