postgresql/src/backend
Andres Freund 560bb56c6e Fix memory leak and inefficiency in CREATE DATABASE ... STRATEGY WAL_LOG
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
2023-03-22 09:26:23 -07:00
..
access Fix netmask handling in inet_minmax_multi_ops 2023-03-20 10:20:35 +01:00
backup In basebackup.c, perform end-of-file test after checksum validation. 2023-03-06 10:20:17 -05:00
bootstrap Process session_preload_libraries within InitPostgres's transaction. 2022-07-25 10:27:43 -04:00
catalog Allow REPLICA IDENTITY to be set on an index that's not (yet) valid. 2023-01-21 13:10:29 -05:00
commands Fix fractional vacuum_cost_delay. 2023-03-15 14:02:49 +13:00
executor Ignore dropped columns during apply of update/delete. 2023-03-21 09:40:41 +05:30
foreign Rename SetSingleFuncCall() to InitMaterializedSRF() 2022-10-18 10:22:40 +09:00
jit Fix typos in comments, code and documentation 2023-01-03 16:26:27 +09:00
lib Fix lock assertions in dshash.c. 2022-07-11 16:01:22 +12:00
libpq Fix handling of SCRAM-SHA-256's channel binding with RSA-PSS certificates 2023-02-15 10:12:31 +09:00
main Fix outdated --help message for postgres -f 2022-08-15 13:37:32 +09:00
nodes Fix pg_stat_statements for MERGE 2022-09-27 10:44:42 +02:00
optimizer Fix incorrect logic for determining safe WindowAgg run conditions 2023-03-17 15:51:00 +13:00
parser Fix failure to detect some cases of improperly-nested aggregates. 2023-03-13 12:40:28 -04:00
partitioning Small cleanup of create_list_bounds() 2022-07-13 17:01:39 +12:00
po Translation updates 2023-02-06 12:15:49 +01:00
port Ensure that the argument of shmdt(2) is declared "void *". 2022-02-15 17:17:28 -05:00
postmaster Small tidyup for commit d41a178b, part II. 2023-03-17 14:46:03 +13:00
regex Defend against stack overrun in a few more places. 2022-08-24 13:02:19 -04:00
replication Don't repeatedly register cache callbacks in pgoutput plugin. 2023-02-23 15:40:28 -05:00
rewrite Fix more bugs caused by adding columns to the end of a view. 2023-03-07 18:21:53 -05:00
snowball In the Snowball dictionary, don't try to stem excessively-long words. 2022-08-31 10:42:05 -04:00
statistics Remove unnecessary code in dependency_is_compatible_expression(). 2023-03-14 11:10:45 -04:00
storage Fix memory leak and inefficiency in CREATE DATABASE ... STRATEGY WAL_LOG 2023-03-22 09:26:23 -07:00
tcop Rethink handling of [Prevent|Is]InTransactionBlock in pipeline mode. 2022-12-13 14:23:59 -05:00
tsearch Fix t_isspace(), etc., when datlocprovider=i and datctype=C. 2023-03-17 12:07:47 -07:00
utils Fix t_isspace(), etc., when datlocprovider=i and datctype=C. 2023-03-17 12:07:47 -07:00
.gitignore
Makefile Move basebackup code to new directory src/backend/backup 2022-08-10 14:03:09 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Translation updates 2022-11-07 14:04:05 +01:00