postgresql/src/bin/scripts
Michael Paquier 04cf0bfc90 Fix memory leak coming from simple lists built in reindexdb
When building a list of relations for a parallel processing of a schema
or a database (or just a single-entry list for the non-parallel case
with the database name), the list is allocated and built on-the-fly for
each database processed, leaking after one database-level reindex is
done.  This accumulates leaks when processing all databases, and could
become a visible issue with thousands of relations.

This is fixed by introducing a new routine in simple_list.c to free all
the elements in a simple list made of strings or OIDs.  The header of
the list may be using a variable declaration or an allocated pointer,
so we don't have a routine to free this part to keep the interface
simple.

Per report from coverity for an issue introduced by 5ab892c, and
valgrind complains about the leak as well.  The idea to introduce a new
routine in simple_list.c is from Tom Lane.

Author: Michael Paquier
Reviewed-by: Tom Lane
2019-07-30 10:54:48 +09:00
..
po Translation updates 2019-06-17 15:30:20 +02:00
t Add support for --jobs in reindexdb 2019-07-27 22:21:18 +09:00
.gitignore Remove createlang and droplang 2017-03-23 14:16:45 -04:00
Makefile Add support for --jobs in reindexdb 2019-07-27 22:21:18 +09:00
clusterdb.c Refactor parallelization processing code in src/bin/scripts/ 2019-07-19 09:31:58 +09:00
common.c Refactor parallelization processing code in src/bin/scripts/ 2019-07-19 09:31:58 +09:00
common.h Refactor parallelization processing code in src/bin/scripts/ 2019-07-19 09:31:58 +09:00
createdb.c Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
createuser.c Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
dropdb.c Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
dropuser.c Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
nls.mk Unified logging system for command-line programs 2019-04-01 20:01:35 +02:00
pg_isready.c Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
reindexdb.c Fix memory leak coming from simple lists built in reindexdb 2019-07-30 10:54:48 +09:00
scripts_parallel.c Refactor parallelization processing code in src/bin/scripts/ 2019-07-19 09:31:58 +09:00
scripts_parallel.h Refactor parallelization processing code in src/bin/scripts/ 2019-07-19 09:31:58 +09:00
vacuumdb.c Remove more progname references in vacuumdb.c 2019-07-23 14:29:34 +09:00