aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-03-22 14:28:45 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-03-22 14:28:45 -0400
commit4fe2aa7656dce2bd31d4807a6843ff495b9deb80 (patch)
tree930bcb53056bd6e04c22831f667e1d99c55325c3 /src/backend/executor/nodeModifyTable.c
parent3e51b278db6a4e2f50f3f6b9edc9667af1f934fd (diff)
downloadpostgresql-4fe2aa7656dce2bd31d4807a6843ff495b9deb80.tar.gz
postgresql-4fe2aa7656dce2bd31d4807a6843ff495b9deb80.zip
Reduce memory leakage in initdb.
While testing commit 3e51b278d, I noted that initdb leaks about a megabyte worth of data due to the sloppy bookkeeping in its string-manipulating code. That's not a huge amount on modern machines, but it's still kind of annoying, and it's easy to fix by recognizing that we might as well treat these arrays of strings as modifiable-in-place. There's no caller that cares about preserving the old state of the array after replace_token or replace_guc_value. With this fix, valgrind sees only a few hundred bytes leaked during an initdb run. Discussion: https://postgr.es/m/2844176.1674681919@sss.pgh.pa.us
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions