Re: Hash support for row types
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>,
Andres Freund <andres@anarazel.de>
Date: 2020-11-17T13:25:59Z
Lists: pgsql-hackers
Attachments
- 0001-Add-more-tests-for-hashing-and-hash-based-plans.patch (text/plain) patch 0001
I wrote a new patch to add a lot more tests around hash-based plans. This is intended to apply separately from the other patch, and the other patch would then "flip" some of the test cases. On 2020-11-13 20:51, Tom Lane wrote: > * The new test in with.sql claims to be testing row hashing, but > it's not very apparent that any such thing actually happens. Maybe > EXPLAIN the query, as well as execute it, to confirm that a > hash-based plan is used. The recursive union requires hashing, but this is not visible in the plan. You only get an error if there is no hashing support for a type. I have added a test for this. For the non-recursive union, I have added more tests that show this in the plans. > * Is it worth devising a test case in which hashing is not possible > because one of the columns isn't hashable? I have mixed feelings > about this because the set of suitable column types may decrease > to empty over time, making it hard to maintain the test case. I used the money type for now. If someone adds hash support for that, we'll change it. I don't think this will change too rapidly, though. -- Peter Eisentraut 2ndQuadrant, an EDB company https://www.2ndquadrant.com/
Commits
-
Hash support for row types
- 01e658fa74cb 14.0 landed
-
Add more tests for hashing and hash-based plans
- 6dd8b0080787 14.0 landed