From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: pg_dump: Reduce use of global variables |
Date: | 2014-10-14 18:20:20 |
Message-ID: | E1Xe6ho-00033q-Er@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
pg_dump: Reduce use of global variables
Most pg_dump.c global variables, which were passed down individually to
dumping routines, are now grouped as members of the new DumpOptions
struct, which is used as a local variable and passed down into routines
that need it. This helps future development efforts; in particular it
is said to enable a mode in which a parallel pg_dump run can output
multiple streams, and have them restored in parallel.
Also take the opportunity to clean up the pg_dump header files somewhat,
to avoid circularity.
Author: Joachim Wieland, revised by Álvaro Herrera
Reviewed by Peter Eisentraut
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/0eea8047bf0e15b402b951e383e39236bdfe57d5
Modified Files
--------------
src/bin/pg_dump/common.c | 27 +-
src/bin/pg_dump/compress_io.c | 3 +-
src/bin/pg_dump/compress_io.h | 1 -
src/bin/pg_dump/dumputils.h | 19 +-
src/bin/pg_dump/parallel.c | 18 +-
src/bin/pg_dump/parallel.h | 30 +-
src/bin/pg_dump/pg_backup.h | 110 ++++-
src/bin/pg_dump/pg_backup_archiver.c | 91 +++-
src/bin/pg_dump/pg_backup_archiver.h | 83 ++--
src/bin/pg_dump/pg_backup_custom.c | 9 +-
src/bin/pg_dump/pg_backup_db.c | 25 +-
src/bin/pg_dump/pg_backup_db.h | 11 +-
src/bin/pg_dump/pg_backup_directory.c | 17 +-
src/bin/pg_dump/pg_backup_null.c | 14 +-
src/bin/pg_dump/pg_backup_tar.c | 9 +-
src/bin/pg_dump/pg_backup_utils.c | 1 -
src/bin/pg_dump/pg_backup_utils.h | 4 +
src/bin/pg_dump/pg_dump.c | 873 ++++++++++++++++-----------------
src/bin/pg_dump/pg_dump.h | 77 +--
src/bin/pg_dump/pg_dump_sort.c | 4 +-
src/bin/pg_dump/pg_dumpall.c | 6 +-
src/bin/pg_dump/pg_restore.c | 9 +-
22 files changed, 762 insertions(+), 679 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2014-10-14 19:58:51 | Re: pgsql: pg_dump: Reduce use of global variables |
Previous Message | Heikki Linnakangas | 2014-10-14 07:14:31 | pgsql: Don't let protected variable access to be reordered after spinlo |