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

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: 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: 2017-12-29 17:59:30
Message-ID: 20171229175930.3aew7lzwd5w6m2x6@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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.

This version includes the fixes I posted as "delta" to the problems
Jesper reported, as well as fixes to the ones reported by Amit. It's
looking pretty good to me -- I'm seeing it as a candidate to commit
early in the upcoming commitfest.


Álvaro Herrera
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v9-0001-Local-partitioned-indexes.patch text/plain 153.3 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2017-12-29 18:25:35 Rangejoin rebased
Previous Message Pavel Stehule 2017-12-29 17:50:59 Re: array_ndims never returns zero