pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix partitioned index attachment 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix partitioned index attachment @ 2019-04-25 15:23 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2019-04-25 15:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix partitioned index attachment When an existing index in a partition is attached to a new index on its parent, we forgot to set the "relispartition" flag correctly, which meant that it was not possible to find the index in various operations, such as adding a foreign key constraint that references that partitioned table. One of four places that was assigning the parent index was forgetting to do that, so fix by shifting responsibility of updating the flag to the routine that changes the parent. Author: Amit Langote, Álvaro Herrera Reported-by: Hubert "depesz" Lubaczewski Discussion: https://postgr.es/m/CA+HiwqHMsRtRYRWYTWavKJ8x14AFsv7bmAV46mYwnfD3vy8goQ@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/05b38c7e63d1c8bca8c07ab4c8b194eed3c50ec7 Modified Files -------------- src/backend/commands/indexcmds.c | 24 ++++++++++++++++++++ src/backend/commands/tablecmds.c | 37 ------------------------------- src/test/regress/expected/foreign_key.out | 12 ++++++++++ src/test/regress/sql/foreign_key.sql | 10 +++++++++ 4 files changed, 46 insertions(+), 37 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix partitioned index attachment @ 2019-04-25 15:39 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2019-04-25 15:39 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix partitioned index attachment When an existing index in a partition is attached to a new index on its parent, we forgot to set the "relispartition" flag correctly, which meant that it was not possible to find the index in various operations, such as adding a foreign key constraint that references that partitioned table. One of four places that was assigning the parent index was forgetting to do that, so fix by shifting responsibility of updating the flag to the routine that changes the parent. Author: Amit Langote, Álvaro Herrera Reported-by: Hubert "depesz" Lubaczewski Discussion: https://postgr.es/m/CA+HiwqHMsRtRYRWYTWavKJ8x14AFsv7bmAV46mYwnfD3vy8goQ@mail.gmail.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b1f570b57cccba9275649815be009a3947b48130 Modified Files -------------- src/backend/commands/indexcmds.c | 24 ++++++++++++++++++++++++ src/backend/commands/tablecmds.c | 37 ------------------------------------- 2 files changed, 24 insertions(+), 37 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-04-25 15:39 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-04-25 15:23 pgsql: Fix partitioned index attachment Alvaro Herrera <alvherre@alvh.no-ip.org> 2019-04-25 15:39 pgsql: Fix partitioned index attachment 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