mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
release memory used while flushing logical mappings
Patch by Ants Aasma
This commit is contained in:
parent
c27bf777cf
commit
4d0d607a45
@ -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 New Issue
Block a user