pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Subject: Re: Upgrading pg_statistic to handle collation honestly
Date: Thu, 13 Dec 2018 08:20:47 +0100
Message-ID: <6e3eddc2-5084-e0c9-43bc-39649efd5331@2ndquadrant.com> (raw)
In-Reply-To: <14706.1544630227@sss.pgh.pa.us>
References: <14706.1544630227@sss.pgh.pa.us>

On 12/12/2018 16:57, Tom Lane wrote:
> Attached is a draft patch for same.  It adds storage to pg_statistic
> to record the collation of each statistics "slot".  A plausible
> alternative design would be to just say "look at the collation of the
> underlying column", but that would require extra catcache lookups in
> the selectivity functions that need the info.

That looks like a good approach to me.

> Doing it like this also
> makes it theoretically feasible to track stats computed with respect
> to different collations for the same column, though I'm not really
> convinced that we'd ever do that.

It's a good option to keep around.  Maybe someday extended statistics
could be used to ask for additional statistics to be collected.

> * Probably this conflicts to some extent with Peter's "Reorganize
> collation lookup" patch, but I haven't studied that yet.

I've looked it over, and it's nothing that can't be easily fixed up.  In
fact, it simplifies a few things, so I'm in favor of moving your patch
along first.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (5+ messages)  latest in thread

Message-ID: <6e3eddc2-5084-e0c9-43bc-39649efd5331@2ndquadrant.com>
Permalink:  ../6e3eddc2-5084-e0c9-43bc-39649efd5331@2ndquadrant.com/
Also on:    postgresql.org/message-id/6e3eddc2-5084-e0c9-43bc-39649efd5331@2ndquadrant.com

 · 

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: peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: Upgrading pg_statistic to handle collation honestly
  In-Reply-To: <6e3eddc2-5084-e0c9-43bc-39649efd5331@2ndquadrant.com>

* 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