Re: Logical Replication - detail message with names of missing columns

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Logical Replication - detail message with names of missing columns
Date: 2020-09-08 14:23:24
Message-ID: CALj2ACVy+W8SeH2OddN2H8a7PLeSv1ue4ugj9dKZOVw6kCX+HA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for the comments, v2 patch is attached.

>
> On Tue, Sep 8, 2020 at 6:50 AM Kyotaro Horiguchi
> <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> >
> > +1 for objective. However, that can be done simpler way that doesn't
> > need additional loops by using bitmapset to hold missing remote
> > attribute numbers. This also make the variable "found" useless.
> >
>
> Thanks. I will look into it and post a v2 patch soon.
>

Changed.

> >
> > FWIW, I would prefer that the message be like
> >
> > logical replication target relation "public.test_1" is missing
> > replicated columns: "a1", "c1"
> >
>
> This looks fine, I will change that.
>

Changed. Now the error looks like as shown below:

ERROR: logical replication target relation "public.test_tbl1" is
missing replicated columns:"d1"
ERROR: logical replication target relation "public.test_tbl1" is
missing replicated columns:"c1","d1"
ERROR: logical replication target relation "public.test_tbl1" is
missing replicated columns:"a1","c1","d1"
ERROR: logical replication target relation "public.test_tbl1" is
missing replicated columns:"a1","b1","c1","d1"
ERROR: logical replication target relation "public.test_tbl1" is
missing replicated columns:"a1","b1","c1","d1","e1"

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v2-0001-Detail-message-with-names-of-missing-columns-in-l.patch application/x-patch 3.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2020-09-08 14:45:07 Re: Collation versioning
Previous Message Alvaro Herrera 2020-09-08 14:18:16 Re: default partition and concurrent attach partition