]> granicus.if.org Git - postgresql/commit
pg_dump: Reduce use of global variables
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 14 Oct 2014 18:00:55 +0000 (15:00 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 14 Oct 2014 18:00:55 +0000 (15:00 -0300)
commit0eea8047bf0e15b402b951e383e39236bdfe57d5
tree450b0761bb6d674de42e9018ac38c1d5f40e11f3
parente0d97d77bf0875e4d5cc7dedfe701d9999bf678c
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
22 files changed:
src/bin/pg_dump/common.c
src/bin/pg_dump/compress_io.c
src/bin/pg_dump/compress_io.h
src/bin/pg_dump/dumputils.h
src/bin/pg_dump/parallel.c
src/bin/pg_dump/parallel.h
src/bin/pg_dump/pg_backup.h
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_archiver.h
src/bin/pg_dump/pg_backup_custom.c
src/bin/pg_dump/pg_backup_db.c
src/bin/pg_dump/pg_backup_db.h
src/bin/pg_dump/pg_backup_directory.c
src/bin/pg_dump/pg_backup_null.c
src/bin/pg_dump/pg_backup_tar.c
src/bin/pg_dump/pg_backup_utils.c
src/bin/pg_dump/pg_backup_utils.h
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_dump_sort.c
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_dump/pg_restore.c