Re: Question on error code selection in conflict detection

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: Question on error code selection in conflict detection
Date: 2025-06-10 06:44:40
Message-ID: CAFiTN-sipn4VVKqwZKBrXptrY-YOOFnn1ZKZNwNdnOB52NVqCA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 10, 2025 at 1:25 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Mon, Jun 9, 2025 at 9:45 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> > I was reviewing the code for conflict reporting and became curious
> > about the choice of ERRCODE_T_R_SERIALIZATION_FAILURE. This error code
> > typically signifies a serialization failure within a transaction under
> > serializable isolation, so its use here for a different type of
> > conflict seems somewhat out of place. I did notice its use in other
> > contexts for recovery conflicts in physical replication, which also
> > struck me as a bit unusual.
> >
> > Given these observations, I'm wondering if it would be more
> > appropriate to introduce a new, more specific error code for this
> > purpose?
>
> Makes sense to me. I'm not sure if we should use a new error code or
> some other existing one, but conflating other things with serializable
> failures seems like a bad plan.

Yeah we may use existing as well if we find some appropriate error codes.

--
Regards,
Dilip Kumar
Google

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2025-06-10 06:44:52 Re: Question on error code selection in conflict detection
Previous Message Michael Paquier 2025-06-10 06:37:18 Re: queryId constant squashing does not support prepared statements