pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: Hash support for row types
Date: Fri, 13 Nov 2020 14:51:48 -0500
Message-ID: <395784.1605297108@sss.pgh.pa.us> (raw)
In-Reply-To: <f7195e93-ab9d-01f0-1140-361aece79248@2ndquadrant.com>
References: <38eccd35-4e2d-6767-1b3c-dada1eac3124@2ndquadrant.com>
	<20201019233234.r6lyxbvdg5s77rvd@alap3.anarazel.de>
	<e88b1974-5987-9ae8-7e54-7d66f54751cb@2ndquadrant.com>
	<f7195e93-ab9d-01f0-1140-361aece79248@2ndquadrant.com>

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> Here is an updated patch with the type cache integration added.

> To your point, this now checks each fields hashability before 
> considering a row type as hashable.  It can still have run-time errors 
> for untyped record datums, but that's not something we can do anything 
> about.

This looks good code-wise.  A couple small niggles on the tests:

* 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.

* 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 marked it RFC.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <395784.1605297108@sss.pgh.pa.us>
Permalink:  ../395784.1605297108@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/395784.1605297108@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, andres@anarazel.de
  Subject: Re: Hash support for row types
  In-Reply-To: <395784.1605297108@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox