Re: [PATCH] Pageinspect - add functions on GIN and GiST indexes from gevel

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
Cc: Alexey Chernyshov <a(dot)chernyshov(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Pageinspect - add functions on GIN and GiST indexes from gevel
Date: 2017-10-03 18:27:16
Message-ID: CAPpHfdu1ZoQXvRp9PGnO5rarwPardiS1vC0iO6pakwyc395eFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 13, 2017 at 10:57 AM, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
wrote:

> On Wed, Sep 13, 2017 at 1:15 PM, Alexey Chernyshov
> <a(dot)chernyshov(at)postgrespro(dot)ru> wrote:
> > On Sat, 9 Sep 2017 13:53:35 +0530
> > Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> wrote:
> >
> >>
> >> Finally, i got some time to look into this patch and surprisingly I
> >> didn't find any function returning information at page level instead
> >> all the SQL functions are returning information at index level.
> >> Therefore, i too feel that it should be either integrated with
> >> pgstattuple which could a better match as Tomas also mentioned or may
> >> be add a new contrib module itself. I think, adding a new contrib
> >> module looks like a better option. The reason being, it doesn't simply
> >> include the function for showing index level statistics (for e.g..
> >> index size, no of rows, values..e.t.c) like pgstattuple does but,
> >> also, displays information contained in a page for e.g. the object
> >> stored in the page, it's tid e.t.c. So, more or less, I would say
> >> that, it's the mixture of pageinspect and pgstattuple module and
> >> therefore, i feel, adding it as a new extension would be a better
> >> choice. Thought?
> >
> > Thank you for your interest, I will add a new contrib module named,
> > say, indexstat. I think we can add statistics on other indexes in the
> > future.
> >
>
> I think we should wait for experts opinion and then take a call. I am
> not expert. I just gave my opinion as i have worked in this area
> earlier when working for hash index. Thanks.

I'm not sure that we should port these functions from gevel directly. We
could try to re-implement similar functionality which fits pageinspect
approach better. In particular, we can implement some low-level functions
whose show detailed information at page level. And on top of them we can
implement analogues of gevel functions in SQL or PL/pgSQL. Is it feasible?

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2017-10-03 18:32:22 Re: [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM
Previous Message Andres Freund 2017-10-03 18:23:16 Re: Add TOAST to system tables with ACL?