pgsql: Fix memory leak and inefficiency in CREATE DATABASE ... STRATEGY

2023-03-22 Thread Andres Freund
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

pgsql: Fix memory leak and inefficiency in CREATE DATABASE ... STRATEGY

2023-03-22 Thread Andres Freund
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