From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Jesper Pedersen <jesper.pedersen@redhat.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Maksim Milyutin <milyutinma@gmail.com>
Subject: Re: [HACKERS] Proposal: Local indexes for partitioned table
Date: Tue, 14 Nov 2017 22:46:18 +0100
Message-ID: <20171114214618.5trtvdrm3fjo7ji3@alvherre.pgsql> (raw)
In-Reply-To: <3d57d8ad-e76d-f0cf-0c42-d1202c643dba@redhat.com>
Hi Jesper,
Thanks for reviewing.
Jesper Pedersen wrote:
> I have been looking at the "CREATE INDEX ... ONLY" syntax, and I think it
> could cause some confusion due to the "Note" described in create_index.sgml.
>
> An alternative, maybe crazy, could be to treat a partitioned index as one;
> e.g. all operations are on the definition.
Well, honestly that's the way I wanted partitioning to be defined, right
from the start -- my first proposal was that partitions were not to be
standalone objects. But I was outvoted once I stepped out of the
implementation, and partitioning is now the way we have it -- each
partition its own separate object. Until we change that view (if we
ever do), I think the only sensible decision is that the whole feature
works that way.
> Some comments. [...]
Thanks, will fix. Except for this one:
> A small thing, for
>
> -- test.sql --
> CREATE TABLE test (a integer NOT NULL) PARTITION BY HASH(a);
> CREATE TABLE test_p00 PARTITION OF test FOR VALUES WITH (MODULUS 2,
> REMAINDER 0);
> CREATE TABLE test_p01 PARTITION OF test FOR VALUES WITH (MODULUS 2,
> REMAINDER 1);
> CREATE INDEX idx_test_a ON test (a);
> -- test.sql --
>
> I would expect that the index names were 'test_p00_idx_test_a' and
> 'test_p01_idx_test_a'.
Hmm, the code in my patch just uses the standard naming routine for
indexes. I'm disinclined to change it in the initial commit, but
perhaps we can change that later.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, jesper.pedersen@redhat.com, simon@2ndquadrant.com, robertmhaas@gmail.com, milyutinma@gmail.com
Subject: Re: [HACKERS] Proposal: Local indexes for partitioned table
In-Reply-To: <20171114214618.5trtvdrm3fjo7ji3@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox