Fix interference between covering indexes and partitioned tables
authorTeodor Sigaev <teodor@sigaev.ru>
Thu, 12 Apr 2018 14:25:13 +0000 (17:25 +0300)
committerTeodor Sigaev <teodor@sigaev.ru>
Thu, 12 Apr 2018 14:25:13 +0000 (17:25 +0300)
commit524054598fd300c75007f53aebd67f9ced33b7db
tree4bb2a55c591b20cc263539d1b05052243593a7e4
parentc266ed31a8a3beed3533e6a78faeca78234cbd43
Fix interference between covering indexes and partitioned tables

The bug is caused due to the original IndexStmt that DefineIndex receives
being overwritten when processing the INCLUDE columns. Use separate list of
index params to propagate to child tables. Add tests covering this case.

Amit Langote and Alexander Korotkov.

Re-commit 5c6110c6a960ad6fe1b0d0fec6ae36ef4eb913f5 because it discovered a bug
fixed in c266ed31a8a3beed3533e6a78faeca78234cbd43

Discussion: https://www.postgresql.org/message-id/CAJGNTeO%3DBguEyG8wxMpU_Vgvg3nGGzy71zUQ0RpzEn_mb0bSWA%40mail.gmail.com
src/backend/commands/indexcmds.c
src/test/regress/expected/indexing.out
src/test/regress/sql/indexing.sql