Re: Internal error codes triggered by tests

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Internal error codes triggered by tests
Date: 2024-07-05 00:57:19
Message-ID: ZodE71m3e7qUibAC@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 04, 2024 at 11:00:01AM +0300, Alexander Lakhin wrote:
> Could you please share your thoughts regarding other error cases, which is
> not triggered by existing tests, but still can be easily reached by users?
>
> For example:
> SELECT satisfies_hash_partition(1, 1, 0, 0);
>
> ERROR:  XX000: could not open relation with OID 1
> LOCATION:  relation_open, relation.c:61
>
> or:
> CREATE TABLE t (b bytea);
> INSERT INTO t SELECT ''::bytea;
> CREATE INDEX brinidx ON t USING brin
>  (b bytea_bloom_ops(n_distinct_per_range = -1.0));
>
> ERROR:  XX000: the bloom filter is too large (44629 > 8144)
> LOCATION:  bloom_init, brin_bloom.c:344
>
> Should such cases be corrected too?

This is a case-by-case. satisfies_hash_partition() is undocumented,
so doing nothing is fine by me. The second one, though is something
taht can be triggered with rather normal DDL sequences. That's more
annoying.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2024-07-05 01:00:47 Re: Support "Right Semi Join" plan shapes
Previous Message David Rowley 2024-07-05 00:52:28 Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE