pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix unsafe memory management in CloneRowTriggersToPartition(). 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix unsafe memory management in CloneRowTriggersToPartition(). @ 2019-06-03 20:59 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2019-06-03 20:59 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix unsafe memory management in CloneRowTriggersToPartition(). It's not really supported to call systable_getnext() in a different memory context than systable_beginscan() was called in, and it's *definitely* not safe to do so and then reset that context between calls. I'm not very clear on how this code survived CLOBBER_CACHE_ALWAYS testing ... but Alexander Lakhin found a case that would crash it pretty reliably. Per bug #15828. Fix, and backpatch to v11 where this code came in. Discussion: https://postgr.es/m/15828-f6ddd7df4852f473@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/eaf0292c3ba7acac2735f99a8988bd49a26112f5 Modified Files -------------- src/backend/commands/tablecmds.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix unsafe memory management in CloneRowTriggersToPartition(). @ 2019-06-03 20:59 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2019-06-03 20:59 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix unsafe memory management in CloneRowTriggersToPartition(). It's not really supported to call systable_getnext() in a different memory context than systable_beginscan() was called in, and it's *definitely* not safe to do so and then reset that context between calls. I'm not very clear on how this code survived CLOBBER_CACHE_ALWAYS testing ... but Alexander Lakhin found a case that would crash it pretty reliably. Per bug #15828. Fix, and backpatch to v11 where this code came in. Discussion: https://postgr.es/m/15828-f6ddd7df4852f473@postgresql.org Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/601084eb1aa8f1ae5303d9cf130d5b8cc385b517 Modified Files -------------- src/backend/commands/tablecmds.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-06-03 20:59 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-06-03 20:59 pgsql: Fix unsafe memory management in CloneRowTriggersToPartition(). Tom Lane <tgl@sss.pgh.pa.us> 2019-06-03 20:59 pgsql: Fix unsafe memory management in CloneRowTriggersToPartition(). 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