Re: Hypothetical indexes using BRIN broken since pg10

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Hypothetical indexes using BRIN broken since pg10
Date: 2019-11-19 05:40:25
Message-ID: 20191119054025.GE1614@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 15, 2019 at 12:07:15PM +0900, Michael Paquier wrote:
> So, Heikki, are you planning to work more on that and commit a change
> close to what has been proposed upthread in [1]? It sounds to me that
> this has the advantage to be non-intrusive and a similar solution has
> been used for GIN indexes. Moving the redesign out of the discussion,
> is there actually a downsize with back-patching something like
> Heikki's version?

So... I have been looking at this patch, and indeed it would be nice
to pass down a better value than BRIN_DEFAULT_PAGES_PER_RANGE to be
able to compute the stats in brincostestimate(). Still, it looks also
to me that this allows the code to be able to compute some stats
directly. As there is no consensus on a backpatch yet, my take would
be for now to apply just the attached on HEAD, and consider a
back-patch later on if there are more arguments in favor of it. If
you actually test hypopg currently, the code fails when attempting to
open the relation to get the stats now.

Attached are the patch for HEAD, as well as a patch to apply to hypopg
on branch REL1_STABLE to make the module compatible with PG13~.

Any objections?

NB @Julien: perhaps you'd want to apply the second patch to the
upstream repo of hypopg, and add more tests for other index AMs like
GIN and BRIN.
--
Michael

Attachment Content-Type Size
hypopg-pg13.patch text/x-diff 3.2 KB
fix_hypothetical_brin-v3.patch text/x-diff 2.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message k.jamison@fujitsu.com 2019-11-19 06:39:53 RE: Recovery performance of DROP DATABASE with many tablespaces
Previous Message Gareth Palmer 2019-11-19 04:05:37 Re: [PATCH] Implement INSERT SET syntax