mirror of
https://github.com/postgres/postgres.git
synced 2026-05-28 04:35:45 -04:00
release memory used while flushing logical mappings
Patch by Ants Aasma
This commit is contained in:
parent
c27bf777cf
commit
4d0d607a45
1 changed files with 2 additions and 1 deletions
|
|
@ -897,7 +897,7 @@ logical_heap_rewrite_flush_mappings(RewriteState state)
|
|||
|
||||
/* write all mappings consecutively */
|
||||
len = src->num_mappings * sizeof(LogicalRewriteMappingData);
|
||||
waldata = palloc(len);
|
||||
waldata = MemoryContextAlloc(state->rs_cxt, len);
|
||||
waldata_start = waldata;
|
||||
|
||||
/*
|
||||
|
|
@ -943,6 +943,7 @@ logical_heap_rewrite_flush_mappings(RewriteState state)
|
|||
/* write xlog record */
|
||||
XLogInsert(RM_HEAP2_ID, XLOG_HEAP2_REWRITE, rdata);
|
||||
|
||||
pfree(waldata);
|
||||
}
|
||||
Assert(state->rs_num_rewrite_mappings == 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue