pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Add some recursion and looping defenses in prepjointree.c.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Add some recursion and looping defenses in prepjointree.c.
@ 2022-12-22 15:35 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-12-22 15:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add some recursion and looping defenses in prepjointree.c.

Andrey Lepikhov demonstrated a case where we spend an unreasonable
amount of time in pull_up_subqueries().  Not only is that recursing
with no explicit check for stack overrun, but the code seems not
interruptable by control-C.  Let's stick a CHECK_FOR_INTERRUPTS
there, along with sprinkling some stack depth checks.

An actual fix for the excessive time consumption seems a bit
risky to back-patch; but this isn't, so let's do so.

Discussion: https://postgr.es/m/703c09a2-08f3-d2ec-b33d-dbecd62428b8@postgrespro.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5beb7881fb27d1830fa4c57ba263c8042449a599

Modified Files
--------------
src/backend/optimizer/prep/prepjointree.c | 12 ++++++++++++
1 file changed, 12 insertions(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Add some recursion and looping defenses in prepjointree.c.
@ 2022-12-22 15:35 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-12-22 15:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add some recursion and looping defenses in prepjointree.c.

Andrey Lepikhov demonstrated a case where we spend an unreasonable
amount of time in pull_up_subqueries().  Not only is that recursing
with no explicit check for stack overrun, but the code seems not
interruptable by control-C.  Let's stick a CHECK_FOR_INTERRUPTS
there, along with sprinkling some stack depth checks.

An actual fix for the excessive time consumption seems a bit
risky to back-patch; but this isn't, so let's do so.

Discussion: https://postgr.es/m/703c09a2-08f3-d2ec-b33d-dbecd62428b8@postgrespro.ru

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1a3daa5bb2e0ec10dd6cee38d120a52bed9213e0

Modified Files
--------------
src/backend/optimizer/prep/prepjointree.c | 12 ++++++++++++
1 file changed, 12 insertions(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Add some recursion and looping defenses in prepjointree.c.
@ 2022-12-22 15:35 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-12-22 15:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add some recursion and looping defenses in prepjointree.c.

Andrey Lepikhov demonstrated a case where we spend an unreasonable
amount of time in pull_up_subqueries().  Not only is that recursing
with no explicit check for stack overrun, but the code seems not
interruptable by control-C.  Let's stick a CHECK_FOR_INTERRUPTS
there, along with sprinkling some stack depth checks.

An actual fix for the excessive time consumption seems a bit
risky to back-patch; but this isn't, so let's do so.

Discussion: https://postgr.es/m/703c09a2-08f3-d2ec-b33d-dbecd62428b8@postgrespro.ru

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/97431d673992326f4f85e4f185941444f33e20db

Modified Files
--------------
src/backend/optimizer/prep/prepjointree.c | 12 ++++++++++++
1 file changed, 12 insertions(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Add some recursion and looping defenses in prepjointree.c.
@ 2022-12-22 15:35 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-12-22 15:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add some recursion and looping defenses in prepjointree.c.

Andrey Lepikhov demonstrated a case where we spend an unreasonable
amount of time in pull_up_subqueries().  Not only is that recursing
with no explicit check for stack overrun, but the code seems not
interruptable by control-C.  Let's stick a CHECK_FOR_INTERRUPTS
there, along with sprinkling some stack depth checks.

An actual fix for the excessive time consumption seems a bit
risky to back-patch; but this isn't, so let's do so.

Discussion: https://postgr.es/m/703c09a2-08f3-d2ec-b33d-dbecd62428b8@postgrespro.ru

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4fceb454f2df57f63d05ccb4a26a9f49c377f28c

Modified Files
--------------
src/backend/optimizer/prep/prepjointree.c | 12 ++++++++++++
1 file changed, 12 insertions(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Add some recursion and looping defenses in prepjointree.c.
@ 2022-12-22 15:35 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-12-22 15:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add some recursion and looping defenses in prepjointree.c.

Andrey Lepikhov demonstrated a case where we spend an unreasonable
amount of time in pull_up_subqueries().  Not only is that recursing
with no explicit check for stack overrun, but the code seems not
interruptable by control-C.  Let's stick a CHECK_FOR_INTERRUPTS
there, along with sprinkling some stack depth checks.

An actual fix for the excessive time consumption seems a bit
risky to back-patch; but this isn't, so let's do so.

Discussion: https://postgr.es/m/703c09a2-08f3-d2ec-b33d-dbecd62428b8@postgrespro.ru

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d572003f74bb6bddac1c0eaf7fb5d0c4af1a3890

Modified Files
--------------
src/backend/optimizer/prep/prepjointree.c | 12 ++++++++++++
1 file changed, 12 insertions(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Add some recursion and looping defenses in prepjointree.c.
@ 2022-12-22 15:35 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-12-22 15:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add some recursion and looping defenses in prepjointree.c.

Andrey Lepikhov demonstrated a case where we spend an unreasonable
amount of time in pull_up_subqueries().  Not only is that recursing
with no explicit check for stack overrun, but the code seems not
interruptable by control-C.  Let's stick a CHECK_FOR_INTERRUPTS
there, along with sprinkling some stack depth checks.

An actual fix for the excessive time consumption seems a bit
risky to back-patch; but this isn't, so let's do so.

Discussion: https://postgr.es/m/703c09a2-08f3-d2ec-b33d-dbecd62428b8@postgrespro.ru

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8cd700cc5a676282912c7080cfa142977a2dd851

Modified Files
--------------
src/backend/optimizer/prep/prepjointree.c | 12 ++++++++++++
1 file changed, 12 insertions(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2022-12-22 15:35 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-12-22 15:35 pgsql: Add some recursion and looping defenses in prepjointree.c. Tom Lane <tgl@sss.pgh.pa.us>
2022-12-22 15:35 pgsql: Add some recursion and looping defenses in prepjointree.c. Tom Lane <tgl@sss.pgh.pa.us>
2022-12-22 15:35 pgsql: Add some recursion and looping defenses in prepjointree.c. Tom Lane <tgl@sss.pgh.pa.us>
2022-12-22 15:35 pgsql: Add some recursion and looping defenses in prepjointree.c. Tom Lane <tgl@sss.pgh.pa.us>
2022-12-22 15:35 pgsql: Add some recursion and looping defenses in prepjointree.c. Tom Lane <tgl@sss.pgh.pa.us>
2022-12-22 15:35 pgsql: Add some recursion and looping defenses in prepjointree.c. 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