pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix broken MemoizePath support in reparameterize_path(). 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix broken MemoizePath support in reparameterize_path(). @ 2022-12-04 18:48 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2022-12-04 18:48 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix broken MemoizePath support in reparameterize_path(). It neglected to recurse to the subpath, meaning you'd get back a path identical to the input. This could produce wrong query results if the omission meant that the subpath fails to enforce some join clause it should be enforcing. We don't have a test case for this at the moment, but the code is obviously broken and the fix is equally obvious. Back-patch to v14 where Memoize was introduced. Richard Guo Discussion: https://postgr.es/m/CAMbWs4_R=ORpz=Lkn2q3ebPC5EuWyfZF+tmfCPVLBVK5W39mHA@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e76913802c5347831aadc1513b59196bde6ec116 Modified Files -------------- src/backend/optimizer/util/pathnode.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix broken MemoizePath support in reparameterize_path(). @ 2022-12-04 18:48 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2022-12-04 18:48 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix broken MemoizePath support in reparameterize_path(). It neglected to recurse to the subpath, meaning you'd get back a path identical to the input. This could produce wrong query results if the omission meant that the subpath fails to enforce some join clause it should be enforcing. We don't have a test case for this at the moment, but the code is obviously broken and the fix is equally obvious. Back-patch to v14 where Memoize was introduced. Richard Guo Discussion: https://postgr.es/m/CAMbWs4_R=ORpz=Lkn2q3ebPC5EuWyfZF+tmfCPVLBVK5W39mHA@mail.gmail.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ce093aa18062f64d5eb16175e361cc34a222c1db Modified Files -------------- src/backend/optimizer/util/pathnode.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix broken MemoizePath support in reparameterize_path(). @ 2022-12-04 18:48 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2022-12-04 18:48 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix broken MemoizePath support in reparameterize_path(). It neglected to recurse to the subpath, meaning you'd get back a path identical to the input. This could produce wrong query results if the omission meant that the subpath fails to enforce some join clause it should be enforcing. We don't have a test case for this at the moment, but the code is obviously broken and the fix is equally obvious. Back-patch to v14 where Memoize was introduced. Richard Guo Discussion: https://postgr.es/m/CAMbWs4_R=ORpz=Lkn2q3ebPC5EuWyfZF+tmfCPVLBVK5W39mHA@mail.gmail.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/834d97c32b712c170594378d27385638c5b87c60 Modified Files -------------- src/backend/optimizer/util/pathnode.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-12-04 18:48 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-12-04 18:48 pgsql: Fix broken MemoizePath support in reparameterize_path(). Tom Lane <tgl@sss.pgh.pa.us> 2022-12-04 18:48 pgsql: Fix broken MemoizePath support in reparameterize_path(). Tom Lane <tgl@sss.pgh.pa.us> 2022-12-04 18:48 pgsql: Fix broken MemoizePath support in reparameterize_path(). Tom Lane <tgl@sss.pgh.pa.us>
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