Re: Improve new hash partition bound check error messages

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Improve new hash partition bound check error messages
Date: 2021-02-15 16:45:51
Message-ID: b7a09729-7815-4bf5-c74c-211ac4997688@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-02-03 15:52, Peter Eisentraut wrote:
> On 2021-02-02 13:26, Heikki Linnakangas wrote:
>> How about this?
>>
>> CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES WITH (MODULUS
>> 25, REMAINDER 3);
>> ERROR: every hash partition modulus must be a factor of the next larger
>> modulus
>> DETAIL: 25 is not divisible by 10, the modulus of existing partition
>> "hpart_1"
>
> I don't know if we can easily get the name of the existing partition.
> I'll have to check that.
>
> I'm worried that this phrasing requires the user to understand that
> "divisible by" is related to "factor of", which is of course correct but
> introduces yet more complexity into this.
>
> I'll play around with this a bit more.

Here is a new patch that implements the suggestions.

Attachment Content-Type Size
v2-0001-Improve-new-hash-partition-bound-check-error-mess.patch text/plain 6.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2021-02-15 17:17:40 Re: MultiXact\SLRU buffers configuration
Previous Message Tomas Vondra 2021-02-15 16:36:00 Re: POC: postgres_fdw insert batching