pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix failure when creating cloned indexes for a partition
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix failure when creating cloned indexes for a partition
@ 2019-11-02 05:18  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2019-11-02 05:18 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure when creating cloned indexes for a partition

When using CREATE TABLE for a new partition, the partitioned indexes of
the parent are created automatically in a fashion similar to LIKE
INDEXES.  The new partition and its parent use a mapping for attribute
numbers for this operation, and while the mapping was correctly built,
its length was defined as the number of attributes of the newly-created
child, and not the parent.  If the parent includes dropped columns, this
could cause failures.

This is wrong since 8b08f7d which has introduced the concept of
partitioned indexes, so backpatch down to 11.

Reported-by: Wyatt Alt
Author: Michael Paquier
Reviewed-by: Amit Langote
Discussion: https://postgr.es/m/CAGem3qCcRmhbs4jYMkenYNfP2kEusDXvTfw-q+eOhM0zTceG-g@mail.gmail.com
Backpatch-through: 11

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dc816e5815913e2b2ae2327a4d3e4d4416ed6898

Modified Files
--------------
src/backend/commands/tablecmds.c           |  2 +-
src/test/regress/expected/create_table.out | 49 ++++++++++++++++++++++++++++++
src/test/regress/sql/create_table.sql      | 23 ++++++++++++++
3 files changed, 73 insertions(+), 1 deletion(-)



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

* pgsql: Fix failure when creating cloned indexes for a partition
@ 2019-11-02 05:18  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2019-11-02 05:18 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure when creating cloned indexes for a partition

When using CREATE TABLE for a new partition, the partitioned indexes of
the parent are created automatically in a fashion similar to LIKE
INDEXES.  The new partition and its parent use a mapping for attribute
numbers for this operation, and while the mapping was correctly built,
its length was defined as the number of attributes of the newly-created
child, and not the parent.  If the parent includes dropped columns, this
could cause failures.

This is wrong since 8b08f7d which has introduced the concept of
partitioned indexes, so backpatch down to 11.

Reported-by: Wyatt Alt
Author: Michael Paquier
Reviewed-by: Amit Langote
Discussion: https://postgr.es/m/CAGem3qCcRmhbs4jYMkenYNfP2kEusDXvTfw-q+eOhM0zTceG-g@mail.gmail.com
Backpatch-through: 11

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f10815c5bf1bcaff1bd51926f493bd073e94ece5

Modified Files
--------------
src/backend/commands/tablecmds.c           |  2 +-
src/test/regress/expected/create_table.out | 49 ++++++++++++++++++++++++++++++
src/test/regress/sql/create_table.sql      | 23 ++++++++++++++
3 files changed, 73 insertions(+), 1 deletion(-)



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

* pgsql: Fix failure when creating cloned indexes for a partition
@ 2019-11-02 05:18  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2019-11-02 05:18 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure when creating cloned indexes for a partition

When using CREATE TABLE for a new partition, the partitioned indexes of
the parent are created automatically in a fashion similar to LIKE
INDEXES.  The new partition and its parent use a mapping for attribute
numbers for this operation, and while the mapping was correctly built,
its length was defined as the number of attributes of the newly-created
child, and not the parent.  If the parent includes dropped columns, this
could cause failures.

This is wrong since 8b08f7d which has introduced the concept of
partitioned indexes, so backpatch down to 11.

Reported-by: Wyatt Alt
Author: Michael Paquier
Reviewed-by: Amit Langote
Discussion: https://postgr.es/m/CAGem3qCcRmhbs4jYMkenYNfP2kEusDXvTfw-q+eOhM0zTceG-g@mail.gmail.com
Backpatch-through: 11

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7963c4c4b7821f286e335c8aed66821c87404ce3

Modified Files
--------------
src/backend/commands/tablecmds.c           |  2 +-
src/test/regress/expected/create_table.out | 49 ++++++++++++++++++++++++++++++
src/test/regress/sql/create_table.sql      | 23 ++++++++++++++
3 files changed, 73 insertions(+), 1 deletion(-)



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


end of thread, other threads:[~2019-11-02 05:18 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-02 05:18 pgsql: Fix failure when creating cloned indexes for a partition Michael Paquier <michael@paquier.xyz>
2019-11-02 05:18 pgsql: Fix failure when creating cloned indexes for a partition Michael Paquier <michael@paquier.xyz>
2019-11-02 05:18 pgsql: Fix failure when creating cloned indexes for a partition Michael Paquier <michael@paquier.xyz>

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