pgsql: Ignore partitioned indexes where appropriate

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Ignore partitioned indexes where appropriate
Date: 2018-01-25 19:12:41
Message-ID: E1eemwz-000268-TO@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Ignore partitioned indexes where appropriate

get_relation_info() was too optimistic about opening indexes in
partitioned tables, which would raise errors when any queries were
planned on such tables. Fix by ignoring any indexes of the partitioned
kind.

CLUSTER (and ALTER TABLE CLUSTER ON) had a similar problem. Fix by
disallowing these commands in partitioned tables.

Fallout from 8b08f7d4820f.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/05fb5d661925f00106373f1a594be5aca24d9a94

Modified Files
--------------
src/backend/commands/cluster.c | 14 ++++++++++++++
src/backend/optimizer/util/plancat.c | 10 ++++++++++
src/test/regress/expected/cluster.out | 8 ++++++++
src/test/regress/expected/indexing.out | 11 +++++++++++
src/test/regress/sql/cluster.sql | 7 +++++++
src/test/regress/sql/indexing.sql | 8 ++++++++
6 files changed, 58 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-01-25 19:26:29 pgsql: Clean up some aspects of pg_dump/pg_restore item-selection logic
Previous Message Tom Lane 2018-01-25 18:54:51 pgsql: Improve pg_dump's handling of "special" built-in objects.