Re: [POC] hash partitioning
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>,
amul sul <sulamul@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Yugo Nagata <nagata@sraoss.co.jp>,
David Steele <david@pgmasters.net>, Greg Stark <stark@mit.edu>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-05-16T13:30:21Z
Lists: pgsql-hackers
On 5/16/17 03:19, Ashutosh Bapat wrote: > On Tue, May 16, 2017 at 10:03 AM, amul sul <sulamul@gmail.com> wrote: >> On Mon, May 15, 2017 at 9:13 PM, Robert Haas <robertmhaas@gmail.com> wrote: >>>>> Collation is only relevant for ordering, not equality. > > While earlier, I thought the same, I am wondering whether this is > true. Don't different collations deem different strings equal e.g one > collation may deem 'aa' and 'AA' as same but other may not. Or is that > encoding problem being discussed in hash functions thread? The collations we currently support don't do that, unless someone made a custom one. However, we might want to support that in the future. Also, text/varchar comparisons always use strcmp() as a tie-breaker. Again, this might be something to review at some point. But you currently have the citext type that would indeed consider 'aa' and 'AA' equal. But citext also has a hash function in the hash operator class that handles that. So you could look into using that approach. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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