Re: [HACKERS] Proposal: Local indexes for partitioned table - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Proposal: Local indexes for partitioned table
Date
Msg-id 239c2d51-2762-4e03-339b-d36f2f69edca@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] Proposal: Local indexes for partitioned table  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: [HACKERS] Proposal: Local indexes for partitioned table
Re: [HACKERS] Proposal: Local indexes for partitioned table
List 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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager
Next
From: Erik Rijkers
Date:
Subject: bug? import foreign schema forgets to import column description