Re: [POC] hash partitioning
Amul Sul <sulamul@gmail.com>
From: amul sul <sulamul@gmail.com>
To: Yugo Nagata <nagata@sraoss.co.jp>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>,
David Steele <david@pgmasters.net>, Greg Stark <stark@mit.edu>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-07-03T11:12:11Z
Lists: pgsql-hackers
On Fri, Jun 23, 2017 at 11:19 AM, Yugo Nagata <nagata@sraoss.co.jp> wrote:
> On Fri, 23 Jun 2017 13:41:15 +0900
> Yugo Nagata <nagata@sraoss.co.jp> wrote:
>
>> On Tue, 6 Jun 2017 13:03:58 +0530
>> amul sul <sulamul@gmail.com> wrote:
>>
>>
>> > Updated patch attached.
>>
>> I looked into the latest patch (v13) and have some comments
>> althogh they might be trivial.
>
> One more comment:
>
> + if (spec->remainder < 0)
> + ereport(ERROR,
> + (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
> + errmsg("remainder for hash partition must be a non-negative integer")));
>
> The value of remainder is defined as Iconst in gram.y, so it never be negative.
> Hence, I think this check is not necessary or Assert is enough.
>
Make sense, fixed this as well in the v14 patch. Thanks again.
Regards,
Amul
Commits
-
Refactor get_partition_for_tuple a bit.
- f0a0c17c1b12 11.0 landed
-
Adopt Bob Jenkins' improved hash function for hash_any(). This changes the
- 8205258fa675 8.4.0 cited
-
Improve hash_any() to use word-wide fetches when hashing suitably aligned
- 2604359251d3 8.4.0 cited