Skip to content

Commit 0845750

Browse files
committed
Avoid memory leakage during VACUUM FULL when an index expression or
index predicate uses temporary memory for evaluation. Per example from Jean-Gerard Pailloncy.
1 parent f9a134b commit 0845750

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/commands/vacuum.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*
1515
* IDENTIFICATION
16-
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.297 2004/12/02 19:28:49 tgl Exp $
16+
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.298 2004/12/23 22:42:15 tgl Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -2553,6 +2553,7 @@ move_chain_tuple(Relation rel,
25532553
{
25542554
ExecStoreTuple(&newtup, ec->slot, InvalidBuffer, false);
25552555
ExecInsertIndexTuples(ec->slot, &(newtup.t_self), ec->estate, true);
2556+
ResetPerTupleExprContext(ec->estate);
25562557
}
25572558
}
25582559

@@ -2662,6 +2663,7 @@ move_plain_tuple(Relation rel,
26622663
{
26632664
ExecStoreTuple(&newtup, ec->slot, InvalidBuffer, false);
26642665
ExecInsertIndexTuples(ec->slot, &(newtup.t_self), ec->estate, true);
2666+
ResetPerTupleExprContext(ec->estate);
26652667
}
26662668
}
26672669

0 commit comments

Comments
 (0)