pg.ddx.io  pgpartman/pg_partman GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
13+ messages / 2 participants
[nested] [flat]

* [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2024-07-14 18:21  "C0mbatwombat (@C0mbatwombat)" <noreply+C0mbatwombat@github.com>
  0 siblings, 0 replies; 13+ messages in thread

From: C0mbatwombat (@C0mbatwombat) @ 2024-07-14 18:21 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

Hi team,

First of all, thank you for this great extension! 
I noticed that non-key index columns (using the `INCLUDE` keyword) are inherited as normal index columns.

A minimal example:
```
create table example_table (
    id        BIGINT not null,
    some_other_column BIGINT not null,

    insertTime              TIMESTAMPTZ NOT NULL DEFAULT now()

) PARTITION BY RANGE (insertTime);

CREATE TABLE example_table_template (LIKE example_table);
ALTER TABLE public.example_table_template ADD PRIMARY KEY (id) INCLUDE (some_other_column);

SELECT partman.create_parent('public.example_table', 'inserttime', '1 month', p_template_table := 'public.example_table_template', p_premake := 2);

postgres=# \d example_table_template
                     Table "public.example_table_template"
      Column       |           Type           | Collation | Nullable | Default 
-------------------+--------------------------+-----------+----------+---------
 id                | bigint                   |           | not null | 
 some_other_column | bigint                   |           | not null | 
 inserttime        | timestamp with time zone |           | not null | 
Indexes:
    "example_table_template_pkey" PRIMARY KEY, btree (id) INCLUDE (some_other_column)  <-------

postgres=# \d example_table_p20240501
                    Table "public.example_table_p20240501"
      Column       |           Type           | Collation | Nullable | Default 
-------------------+--------------------------+-----------+----------+---------
 id                | bigint                   |           | not null | 
 some_other_column | bigint                   |           | not null | 
 inserttime        | timestamp with time zone |           | not null | now()
Partition of: example_table FOR VALUES FROM ('2024-05-01 00:00:00+00') TO ('2024-06-01 00:00:00+00')
Indexes:
    *example_table_p20240501_pkey" PRIMARY KEY, btree (id, some_other_column) <-------

```
I would have expected the index of `example_table_p20240501` to be the same as the index on the `example_table_template` table. Not a huge issue but I thought you might want to know about it.

Thanks!

^ permalink  raw  [nested|flat] 13+ messages in thread

* Re: [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2024-07-15 13:30  "keithf4 (@keithf4)" <noreply+keithf4@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: keithf4 (@keithf4) @ 2024-07-15 13:30 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

@keithf4 applied label "pending review".

^ permalink  raw  [nested|flat] 13+ messages in thread

* Re: [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2024-07-15 13:31  "keithf4 (@keithf4)" <noreply+keithf4@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: keithf4 (@keithf4) @ 2024-07-15 13:31 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

Thanks for the report. Looks like a valid issue but I'll need to investigate more when I get back to working on the next version of partman.

^ permalink  raw  [nested|flat] 13+ messages in thread

* Re: [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2026-08-21 20:18  "keithf4 (@keithf4)" <noreply+keithf4@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: keithf4 (@keithf4) @ 2026-08-21 20:18 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

@keithf4 removed label "pending review".

^ permalink  raw  [nested|flat] 13+ messages in thread

* Re: [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2026-08-21 20:18  "keithf4 (@keithf4)" <noreply+keithf4@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: keithf4 (@keithf4) @ 2026-08-21 20:18 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

@keithf4 applied label "fixed in next release".

^ permalink  raw  [nested|flat] 13+ messages in thread

* Re: [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2026-08-21 20:18  "keithf4 (@keithf4)" <noreply+keithf4@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: keithf4 (@keithf4) @ 2026-08-21 20:18 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

@keithf4 applied label "confirmed bug".

^ permalink  raw  [nested|flat] 13+ messages in thread

* Re: [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2026-08-21 20:18  "keithf4 (@keithf4)" <noreply+keithf4@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: keithf4 (@keithf4) @ 2026-08-21 20:18 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

@keithf4 set milestone to "Next Patch".

^ permalink  raw  [nested|flat] 13+ messages in thread

* Re: [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2026-08-21 20:49  "keithf4 (@keithf4)" <noreply+keithf4@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: keithf4 (@keithf4) @ 2026-08-21 20:49 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

Apologies for the delay on this. I've got a fix for this in the `551` branch if you'd like to test it. Will be included in the next release

https://github.com/pgpartman/pg_partman/tree/551

Thank you for reporting the issue!

^ permalink  raw  [nested|flat] 13+ messages in thread

* Re: [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2026-08-21 20:49  "keithf4 (@keithf4)" <noreply+keithf4@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: keithf4 (@keithf4) @ 2026-08-21 20:49 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

@keithf4 assigned @keithf4.

^ permalink  raw  [nested|flat] 13+ messages in thread

* Re: [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2026-11-19 10:20  "keithf4 (@keithf4)" <noreply+keithf4@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: keithf4 (@keithf4) @ 2026-11-19 10:20 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

@keithf4 set milestone to "5.5".

^ permalink  raw  [nested|flat] 13+ messages in thread

* Re: [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2026-11-19 10:20  "keithf4 (@keithf4)" <noreply+keithf4@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: keithf4 (@keithf4) @ 2026-11-19 10:20 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

@keithf4 removed milestone.

^ permalink  raw  [nested|flat] 13+ messages in thread

* Re: [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2026-11-19 10:21  "keithf4 (@keithf4)" <noreply+keithf4@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: keithf4 (@keithf4) @ 2026-11-19 10:21 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

@keithf4 applied label "fixed in current release".

^ permalink  raw  [nested|flat] 13+ messages in thread

* Re: [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table
@ 2026-11-19 10:21  "keithf4 (@keithf4)" <noreply+keithf4@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: keithf4 (@keithf4) @ 2026-11-19 10:21 UTC (permalink / raw)
  To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>

@keithf4 removed label "fixed in next release".

^ permalink  raw  [nested|flat] 13+ messages in thread


end of thread, other threads:[~2026-11-19 10:21 UTC | newest]

Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-07-14 18:21 [pgpartman/pg_partman] issue #674: Non-key index columns are not properlly inherited from template table "C0mbatwombat (@C0mbatwombat)" <noreply+C0mbatwombat@github.com>
2024-07-15 13:30 ` "keithf4 (@keithf4)" <noreply+keithf4@github.com>
2024-07-15 13:31 ` "keithf4 (@keithf4)" <noreply+keithf4@github.com>
2026-08-21 20:18 ` "keithf4 (@keithf4)" <noreply+keithf4@github.com>
2026-08-21 20:18 ` "keithf4 (@keithf4)" <noreply+keithf4@github.com>
2026-08-21 20:18 ` "keithf4 (@keithf4)" <noreply+keithf4@github.com>
2026-08-21 20:18 ` "keithf4 (@keithf4)" <noreply+keithf4@github.com>
2026-08-21 20:49 ` "keithf4 (@keithf4)" <noreply+keithf4@github.com>
2026-08-21 20:49 ` "keithf4 (@keithf4)" <noreply+keithf4@github.com>
2026-11-19 10:20 ` "keithf4 (@keithf4)" <noreply+keithf4@github.com>
2026-11-19 10:20 ` "keithf4 (@keithf4)" <noreply+keithf4@github.com>
2026-11-19 10:21 ` "keithf4 (@keithf4)" <noreply+keithf4@github.com>
2026-11-19 10:21 ` "keithf4 (@keithf4)" <noreply+keithf4@github.com>

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