Re: Improve the error message for logical replication of regular column to generated column.

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, Shubham Khanna <khannashubham1197(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Improve the error message for logical replication of regular column to generated column.
Date: 2024-11-27 10:27:42
Message-ID: CAA4eK1L5g1FjhnwTHpQ50oYND_=3dwXx4J7Bf4bo8oxbYJbgjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 27, 2024 at 12:45 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> >
> > There is a buildfarm failure in [1]. One of the new tests added to
> > verify the log for the "incompatible generated columns" issue was
> > incorrect. Specifically, the check qr/ERROR: ( [A-Z0-9]:) should have
> > been updated to qr/ERROR: ( [A-Z0-9]+:), which is consistent with
> > similar checks elsewhere in the codebase. The attached patch contains
> > the necessary changes to address this issue.
> > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2024-11-27%2004%3A17%3A03
>
> The issue occurs specifically on the prion machine, which is
> configured with log_error_verbosity = verbose, causing error messages
> to include the sqlerrcode alongside the error description, as shown
> below from [1]:
> 2024-11-27 05:41:13.966 UTC [2990900:3] ERROR: 55000: logical
> replication target relation "public.t1" has incompatible generated
> columns: "c2", "c3"
>
> In contrast, other buildfarm machines do not include the sqlerrcode in
> the error messages, as seen here from [2]:
> 2024-11-27 07:19:45.975 CET [38683:2] ERROR: logical replication
> target relation "public.t1" has incompatible generated columns: "c2",
> "c3"
>
> The problem arises only when the sqlerrcode is present, as the error
> code matching was not correct. I have confirmed that the patch
> referenced in [3] resolves the issue when log_error_verbosity =
> verbose is enabled.
>

Thanks for the analysis. I have pushed your fix.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2024-11-27 10:46:36 Re: Add Pipelining support in psql
Previous Message wenhui qiu 2024-11-27 10:00:33 Re: An inefficient query caused by unnecessary PlaceHolderVar