mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Avoid memory leakage during VACUUM FULL when an index expression or
index predicate uses temporary memory for evaluation. Per example from Jean-Gerard Pailloncy.
This commit is contained in:
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.263 2003/10/02 23:19:44 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.263.2.1 2004/12/23 22:42:32 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -2041,6 +2041,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
|
|||||||
ExecStoreTuple(&newtup, slot, InvalidBuffer, false);
|
ExecStoreTuple(&newtup, slot, InvalidBuffer, false);
|
||||||
ExecInsertIndexTuples(slot, &(newtup.t_self),
|
ExecInsertIndexTuples(slot, &(newtup.t_self),
|
||||||
estate, true);
|
estate, true);
|
||||||
|
ResetPerTupleExprContext(estate);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteBuffer(cur_buffer);
|
WriteBuffer(cur_buffer);
|
||||||
@ -2174,6 +2175,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
|
|||||||
{
|
{
|
||||||
ExecStoreTuple(&newtup, slot, InvalidBuffer, false);
|
ExecStoreTuple(&newtup, slot, InvalidBuffer, false);
|
||||||
ExecInsertIndexTuples(slot, &(newtup.t_self), estate, true);
|
ExecInsertIndexTuples(slot, &(newtup.t_self), estate, true);
|
||||||
|
ResetPerTupleExprContext(estate);
|
||||||
}
|
}
|
||||||
} /* walk along page */
|
} /* walk along page */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user