mirror of
https://github.com/postgres/postgres.git
synced 2026-04-25 16:18:21 -04:00
RelationCopyStorageUsingBuffer() did not free the strategies used to access the source / target relation. They memory was released at the end of the transaction, but when using a template database with a lot of relations, the temporary leak can become big prohibitively big. RelationCopyStorageUsingBuffer() acquired the buffer for the target relation with RBM_NORMAL, therefore requiring a read of a block guaranteed to be zero. Use RBM_ZERO_AND_LOCK instead. Reviewed-by: Robert Haas <robertmhaas@gmail.com> Discussion: https://postgr.es/m/20230321070113.o2vqqxogjykwgfrr@awork3.anarazel.de Backpatch: 15-, where STRATEGY WAL_LOG was introduced |
||
|---|---|---|
| .. | ||
| buffer | ||
| file | ||
| freespace | ||
| ipc | ||
| large_object | ||
| lmgr | ||
| page | ||
| smgr | ||
| sync | ||
| Makefile | ||