From: | Chris Bandy <bandy(dot)chris(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Amit Langote <amitlangote09(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] Add object names to partition errors |
Date: | 2020-03-04 08:54:20 |
Message-ID: | 7985cf2f-5082-22d9-1bb4-6b280150eeae@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 3/3/20 11:18 PM, Chris Bandy wrote:
> On 3/3/20 10:08 AM, Alvaro Herrera wrote:
>> I don't suppose you mean to
>> test that every single ereport() call that includes errtable() contains
>> a TABLE NAME item.
>
> Correct. I intend only to test the few calls I'm touching in this
> It might be worthwhile for someone to perform a more thorough
> review of existing errors, however. The documentation seems to say that
> every error in SQLSTATE class 23 has one of these fields filled[1]. The
> errors in these patches are in that class but lacked any fields.
>
> [1] https://www.postgresql.org/docs/current/errcodes-appendix.html
By the power of grep I found another partition error that needed a
field. I'm pretty happy with the way the test turned out, so I've
squashed everything into a single patch.
I've also convinced myself that the number of integrity errors in the
entire codebase is manageable to test. If others think it is worthwhile,
I can spend some time over the next week to expand this test approach to
cover _all_ SQLSTATE class 23 errors.
If so,
* Should it be one regression test (file) that discusses the
significance of class 23, or
* Should it be a few test cases added to the existing test files related
to each feature?
The former allows the helper function to be defined once, while the
latter would repeat it over many files.
Thanks,
Chris
Attachment | Content-Type | Size |
---|---|---|
v4-0001-Add-object-names-to-partition-errors.patch | text/x-patch | 10.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | John Naylor | 2020-03-04 08:59:32 | Re: Use compiler intrinsics for bit ops in hash |
Previous Message | Julien Rouhaud | 2020-03-04 08:21:45 | Re: reindex concurrently and two toast indexes |