Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided. - Mailing list pgsql-hackers

From Peter Smith
Subject Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.
Date
Msg-id CAHut+Ps1HRfeg4DJnFPACVOu2bx=aN37503RBODSPhefhGpkLA@mail.gmail.com
Whole thread Raw
In response to Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
On Wed, Feb 12, 2025 at 10:58 AM Peter Smith <smithpb2250@gmail.com> wrote:
>
> On Tue, Feb 11, 2025 at 9:16 PM Shubham Khanna
> <khannashubham1197@gmail.com> wrote:
> >
> > > #13. Unanswered question "How are tests expecting this even passing?".
> > > Was a reason identified? IOW, how can we be sure the latest tests
> > > don't have a similar problem?
> > >
> >
> > In the v4-0001 patch [1], the tests were mistakenly using
> > 'command_fails' instead of 'command_fails_like' to verify failed test
> > cases. Since 'command_fails' only checks for a non-zero exit code and
> > not specific error messages, the tests were passing even when the
> > expected errors were not being triggered correctly.
> > To address this, I have updated the patch to use 'command_fails_like',
> > ensuring that the test cases now explicitly verify the correct failure
> > messages.
> >
>
> Ah, that makes sense. Thanks for sharing the reason. So in fact, it
> was a valid concern because the v5 was still carrying over the same
> flaw from v4... Anyway, it is good to know it is fixed now in v6.
>

FYI, I've proposed a patch [1] that can prevent this mistake from
happening in future.

======
[1] https://www.postgresql.org/message-id/CAHut%2BPu-umU%3DCkcSvrqL9eQt85Rv_qfLtekqU-yrjfh%3DGirUQg%40mail.gmail.com

Kind Regards,
Peter Smith.
Fujitsu Australia.



pgsql-hackers by date:

Previous
From: Tatsuro Yamada
Date:
Subject: Re: Showing applied extended statistics in explain Part 2
Next
From: Shlok Kyal
Date:
Subject: Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.