Re: Hash support for row types - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Hash support for row types
Date
Msg-id d1a898b2-cd3d-0519-def9-5f38163c68e8@2ndquadrant.com
Whole thread Raw
In response to Re: Hash support for row types  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Hash support for row types  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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/

Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [patch] [doc] Clarify that signal functions have no feedback
Next
From: James Coleman
Date:
Subject: Re: enable_incremental_sort changes query behavior