Re: [HACKERS] Proposal: Local indexes for partitioned table

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Maksim Milyutin <milyutinma(at)gmail(dot)com>
Subject: Re: [HACKERS] Proposal: Local indexes for partitioned table
Date: 2018-01-04 16:44:15
Message-ID: 239c2d51-2762-4e03-339b-d36f2f69edca@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/29/17 12:59, Alvaro Herrera wrote:
>> Maybe we need a new "auto internal" deptype with a mix of semantics of
>> the other two deptypes. It seems a bit ugly and I'm not sure it'd work
>> either ... I'll try to code it tomorrow.
>
> This seems to work pretty well, much to my surprise. I was a bit scared
> of adding a new deptype, but actually the only affected code is
> findDependentObjects() and the semantics of the new type is a subset of
> the existing DEPTYPE_INTERNAL, so I think it's okay. I need to fill in
> its description in docs and comments though -- I left it out because the
> real difference between INTERNAL and INTERNAL_AUTO is not something that
> is covered by the existing description of INTERNAL, so maybe I'll need
> to expand that one.

So this patch appears to implement what was agreed upon earlier in the
thread. Documentation and tests seem pretty comprehensive.

The new dependency type obviously needs to be explained in detail.

CompareIndexInfo() doesn't compare indexes' operator classes and collations.

I'm not sure why this feature of automatically picking up matching
indexes even exists. Is it for some specific workflows or upgrade
scenarios? It's kind of a surprising feature in a way.

The catalog representations of partitioned tables and partitioned
indexes are completely different, which may or may not be desirable.

As mentioned elsewhere already, the tests fail because \di shows the
owner, which can vary between sites.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Erik Rijkers 2018-01-04 16:57:15 bug? import foreign schema forgets to import column description
Previous Message Robert Haas 2018-01-04 16:39:40 Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager