Re: CREATE SUBSCRIPTION - add missing test case - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: CREATE SUBSCRIPTION - add missing test case
Date
Msg-id CAA4eK1KPzq-KbH_cmB6tYNOWR5hXi5umCFbjxpJYHjK5FBTxaQ@mail.gmail.com
Whole thread Raw
In response to Re: CREATE SUBSCRIPTION - add missing test case  (vignesh C <vignesh21@gmail.com>)
Responses Re: CREATE SUBSCRIPTION - add missing test case
List pgsql-hackers
On Fri, Aug 16, 2024 at 9:45 AM vignesh C <vignesh21@gmail.com> wrote:
>
> On Thu, 15 Aug 2024 at 12:55, Peter Smith <smithpb2250@gmail.com> wrote:
> >
> > Hi Hackers,
> >
> > While reviewing another logical replication thread [1], I found an
> > ERROR scenario that seems to be untested.
> >
> > TEST CASE: Attempt CREATE SUBSCRIPTION where the subscriber table is
> > missing some expected column(s).
> >
> > Attached is a patch to add the missing test for this error message.
>
> I agree currently there is no test to hit this code.
>

I also don't see a test for this error condition. However, it is not
clear to me how important is it to cover this error code path. This
code has existed for a long time and I didn't notice any bugs related
to this. There is a possibility that in the future we might break
something because of a lack of this test but not sure if we want to
cover every code path via tests as each additional test also has some
cost. OTOH, If others think it is important or a good idea to have
this test then I don't have any objection to the same.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Conflict detection and logging in logical replication
Next
From: Pavel Borisov
Date:
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands