relispartition for index partitions

Started by Amit Langoteabout 8 years ago5 messageshackers
Jump to latest
#1Amit Langote
Langote_Amit_f8@lab.ntt.co.jp

Hi.

I noticed that relispartition isn't set for index's partitions.

create table p (a int) partition by list (a);
create table p12 partition of p for values in (1, 2);
create index on p (a);
select relname, relkind from pg_class where relnamespace =
'public'::regnamespace and relispartition is true;
relname | relkind
---------+---------
p12 | r
(1 row)

Is that intentional?

Thanks,
Amit

#2Andres Freund
andres@anarazel.de
In reply to: Amit Langote (#1)
Re: relispartition for index partitions

Hi,

On 2018-01-26 18:57:03 +0900, Amit Langote wrote:

I noticed that relispartition isn't set for index's partitions.

create table p (a int) partition by list (a);
create table p12 partition of p for values in (1, 2);
create index on p (a);
select relname, relkind from pg_class where relnamespace =
'public'::regnamespace and relispartition is true;
relname | relkind
---------+---------
p12 | r
(1 row)

Is that intentional?

This appears to be a question about
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=8b08f7d4820fd7a8ef6152a9dd8c6e3cb01e5f99
et al. Could you look into it? It's been an open item for quite a
while.

Greetings,

Andres Freund

#3Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Andres Freund (#2)
Re: relispartition for index partitions

Hello

Andres Freund wrote:

On 2018-01-26 18:57:03 +0900, Amit Langote wrote:

I noticed that relispartition isn't set for index's partitions.

Is that intentional?

This appears to be a question about
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=8b08f7d4820fd7a8ef6152a9dd8c6e3cb01e5f99
et al. Could you look into it? It's been an open item for quite a
while.

Sure. I'll get this done this week.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Amit Langote (#1)
Re: relispartition for index partitions

Amit Langote wrote:

Hi.

I noticed that relispartition isn't set for index's partitions.

This patch should fix it.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

relispartition.patchtext/plain; charset=us-asciiDownload+46-7
#5Amit Langote
Langote_Amit_f8@lab.ntt.co.jp
In reply to: Alvaro Herrera (#4)
Re: relispartition for index partitions

On 2018/04/12 5:33, Alvaro Herrera wrote:

Amit Langote wrote:

Hi.

I noticed that relispartition isn't set for index's partitions.

This patch should fix it.

Thanks. I saw your commit 9e9befac4a22 and changes seem fine.

Regards,
Amit