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/[email protected] 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(-)
