pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix partitioned index creation bug with dropped columns 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix partitioned index creation bug with dropped columns @ 2019-03-26 23:25 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2019-03-26 23:25 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix partitioned index creation bug with dropped columns ALTER INDEX .. ATTACH PARTITION fails if the partitioned table where the index is defined contains more dropped columns than its partition, with this message: ERROR: incorrect attribute map The cause was that one caller of CompareIndexInfo was passing the number of attributes of the partition rather than the parent, which confused the length check. Repair. This can cause pg_upgrade to fail when used on such a database. Leave some more objects around after regression tests, so that the case is detected by pg_upgrade test suite. Remove some spurious empty lines noticed while looking for other cases of the same problem. Discussion: https://postgr.es/m/20190326213924.GA2322@alvherre.pgsql Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/126d631222328d3def7910934bfa9cbdc99d79cc Modified Files -------------- src/backend/catalog/index.c | 1 - src/backend/commands/indexcmds.c | 1 - src/backend/commands/tablecmds.c | 2 +- src/test/regress/expected/indexing.out | 5 +++++ src/test/regress/sql/indexing.sql | 5 +++++ 5 files changed, 11 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix partitioned index creation bug with dropped columns @ 2019-03-26 23:25 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2019-03-26 23:25 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix partitioned index creation bug with dropped columns ALTER INDEX .. ATTACH PARTITION fails if the partitioned table where the index is defined contains more dropped columns than its partition, with this message: ERROR: incorrect attribute map The cause was that one caller of CompareIndexInfo was passing the number of attributes of the partition rather than the parent, which confused the length check. Repair. This can cause pg_upgrade to fail when used on such a database. Leave some more objects around after regression tests, so that the case is detected by pg_upgrade test suite. Remove some spurious empty lines noticed while looking for other cases of the same problem. Discussion: https://postgr.es/m/20190326213924.GA2322@alvherre.pgsql Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7009f1a2df65598fc6c28368d3a6f1b9e96d69f5 Modified Files -------------- src/backend/catalog/index.c | 1 - src/backend/commands/indexcmds.c | 1 - src/backend/commands/tablecmds.c | 2 +- src/test/regress/expected/indexing.out | 5 +++++ src/test/regress/sql/indexing.sql | 5 +++++ 5 files changed, 11 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-03-26 23:25 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-03-26 23:25 pgsql: Fix partitioned index creation bug with dropped columns Alvaro Herrera <alvherre@alvh.no-ip.org> 2019-03-26 23:25 pgsql: Fix partitioned index creation bug with dropped columns Alvaro Herrera <alvherre@alvh.no-ip.org>
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