Re: [PATCH] Add schema and table names to partition error - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [PATCH] Add schema and table names to partition error
Date
Msg-id CAA4eK1J0H=4kpCVoOHzfHU62Yf=SgcCgSqqT1tGQ3BZh4yazsg@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add schema and table names to partition error  (Chris Bandy <bandy.chris@gmail.com>)
Responses Re: [PATCH] Add schema and table names to partition error  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Wed, Mar 11, 2020 at 8:51 PM Chris Bandy <bandy.chris@gmail.com> wrote:
>
> On 3/11/20 6:29 AM, Amit Kapila wrote:
> >
> > I have tried with git am as well, but it failed.  I am not sure what
> > is the reason.  Can you please once check at your end?
>
> Yes, sorry. This set (and v3 and v4) should work with -p0. Any following
> patches from me will use the normal -p1.
>

Okay.

> > Also, see, if
> > it applies till 9.5 as I think we should backpatch this.
> >
> > IIUC, this patch is mainly to get the table name, schema name in case
> > of the error paths, so that your application can handle errors in case
> > partition constraint violation, right?
>
> Yes, that is correct. Which also means it doesn't apply to 9.5 (no
> partitions!) Later in this thread I created a test that covers all
> integrity violation errors.[1] *That* can be backpatched, if you'd like.
>
> For an approach limited to partitions only, I recommend looking at v4
> rather than v2 or v3.[2]
>

It is strange that I didn't receive your email which has a v4 version.
I will look into it, but I don't think we need to add the tests for
error conditions. Those are good for testing, but I think if we start
adding tests for all error conditions, then it might increase the
number of tests that are not of very high value.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction
Next
From: Kuntal Ghosh
Date:
Subject: Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager