pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Remove dead code for temporary relations in partition planning 2+ messages / 1 participants [nested] [flat]
* pgsql: Remove dead code for temporary relations in partition planning @ 2018-07-04 01:48 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2018-07-04 01:48 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Remove dead code for temporary relations in partition planning Since recent commit 1c7c317c, temporary relations cannot be mixed with permanent relations within the same partition tree, and the same counts for temporary relations created by other sessions, which the planner simply discarded. Instead be paranoid and issue an error, as those should be blocked at definition time, at least for now. At the same time, a test case is added to stress what has been moved when expand_partitioned_rtentry gets called recursively but bumps on a partitioned relation with no partitions which should be handled the same way as the non-inheritance case. This code may be reworked in a close future, and covering this code path will limit surprises. Reported-by: David Rowley Author: David Rowley Reviewed-by: Amit Langote, Robert Haas, Michael Paquier Discussion: https://postgr.es/m/CAKJS1f_HyV1txn_4XSdH5EOhBMYaCwsXyAj6bHXk9gOu4JKsbw@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/fc057b2b8fc3c3556d9f8cc0195c622aaad92c9e Modified Files -------------- src/backend/optimizer/prep/prepunion.c | 33 ++++++++++++++++----------------- src/test/regress/expected/select.out | 13 +++++++++++++ src/test/regress/sql/select.sql | 8 ++++++++ 3 files changed, 37 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Remove dead code for temporary relations in partition planning @ 2018-07-04 01:48 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2018-07-04 01:48 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Remove dead code for temporary relations in partition planning Since recent commit 1c7c317c, temporary relations cannot be mixed with permanent relations within the same partition tree, and the same counts for temporary relations created by other sessions, which the planner simply discarded. Instead be paranoid and issue an error, as those should be blocked at definition time, at least for now. At the same time, a test case is added to stress what has been moved when expand_partitioned_rtentry gets called recursively but bumps on a partitioned relation with no partitions which should be handled the same way as the non-inheritance case. This code may be reworked in a close future, and covering this code path will limit surprises. Reported-by: David Rowley Author: David Rowley Reviewed-by: Amit Langote, Robert Haas, Michael Paquier Discussion: https://postgr.es/m/CAKJS1f_HyV1txn_4XSdH5EOhBMYaCwsXyAj6bHXk9gOu4JKsbw@mail.gmail.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5fca035903a2ad2fd143b14eccf5a58af85c189d Modified Files -------------- src/backend/optimizer/prep/prepunion.c | 33 ++++++++++++++++----------------- src/test/regress/expected/select.out | 13 +++++++++++++ src/test/regress/sql/select.sql | 8 ++++++++ 3 files changed, 37 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-07-04 01:48 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-07-04 01:48 pgsql: Remove dead code for temporary relations in partition planning Michael Paquier <michael@paquier.xyz> 2018-07-04 01:48 pgsql: Remove dead code for temporary relations in partition planning 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