pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Access pg_dump's options structs through Archive struct, not dir 2+ messages / 1 participants [nested] [flat]
* pgsql: Access pg_dump's options structs through Archive struct, not dir @ 2016-01-13 22:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2016-01-13 22:49 UTC (permalink / raw) To: pgsql-committers Access pg_dump's options structs through Archive struct, not directly. Rather than passing around DumpOptions and RestoreOptions as separate arguments, add fields to struct Archive to carry pointers to these objects, and access them through those fields when needed. There already was a RestoreOptions pointer in Archive, though for no obvious reason it was part of the "private" struct rather than out where pg_dump.c could see it. Doing this allows reversion of quite a lot of parameter-addition changes made in commit 0eea8047bf, which is a good thing IMO because this will reduce the code delta between 9.4 and 9.5, probably easing a few future back-patch efforts. Moreover, the previous commit only added a DumpOptions argument to functions that had to have it at the time, which means we could anticipate still more code churn (and more back-patch hazard) as the requirement spread further. I'd hit exactly that problem in my upcoming patch to fix extension membership marking, which is what motivated me to do this. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/5b5fea2a11741e651f7c25e981dd29b610a08426 Modified Files -------------- src/bin/pg_dump/common.c | 20 +- src/bin/pg_dump/parallel.c | 30 +- src/bin/pg_dump/parallel.h | 4 +- src/bin/pg_dump/pg_backup.h | 75 ++--- src/bin/pg_dump/pg_backup_archiver.c | 125 ++++---- src/bin/pg_dump/pg_backup_archiver.h | 13 +- src/bin/pg_dump/pg_backup_custom.c | 12 +- src/bin/pg_dump/pg_backup_directory.c | 32 +-- src/bin/pg_dump/pg_backup_null.c | 16 +- src/bin/pg_dump/pg_backup_tar.c | 34 ++- src/bin/pg_dump/pg_dump.c | 502 ++++++++++++++++++--------------- src/bin/pg_dump/pg_dump.h | 18 +- src/bin/pg_dump/pg_restore.c | 10 +- 13 files changed, 486 insertions(+), 405 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Access pg_dump's options structs through Archive struct, not dir @ 2016-01-13 22:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2016-01-13 22:49 UTC (permalink / raw) To: pgsql-committers Access pg_dump's options structs through Archive struct, not directly. Rather than passing around DumpOptions and RestoreOptions as separate arguments, add fields to struct Archive to carry pointers to these objects, and access them through those fields when needed. There already was a RestoreOptions pointer in Archive, though for no obvious reason it was part of the "private" struct rather than out where pg_dump.c could see it. Doing this allows reversion of quite a lot of parameter-addition changes made in commit 0eea8047bf, which is a good thing IMO because this will reduce the code delta between 9.4 and 9.5, probably easing a few future back-patch efforts. Moreover, the previous commit only added a DumpOptions argument to functions that had to have it at the time, which means we could anticipate still more code churn (and more back-patch hazard) as the requirement spread further. I'd hit exactly that problem in my upcoming patch to fix extension membership marking, which is what motivated me to do this. Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/6adba13e42a34750ef2f88ec0780db8416d8bf2e Modified Files -------------- src/bin/pg_dump/common.c | 20 +- src/bin/pg_dump/parallel.c | 30 +- src/bin/pg_dump/parallel.h | 4 +- src/bin/pg_dump/pg_backup.h | 75 ++--- src/bin/pg_dump/pg_backup_archiver.c | 125 ++++---- src/bin/pg_dump/pg_backup_archiver.h | 13 +- src/bin/pg_dump/pg_backup_custom.c | 12 +- src/bin/pg_dump/pg_backup_directory.c | 32 +-- src/bin/pg_dump/pg_backup_null.c | 16 +- src/bin/pg_dump/pg_backup_tar.c | 34 ++- src/bin/pg_dump/pg_dump.c | 502 ++++++++++++++++++--------------- src/bin/pg_dump/pg_dump.h | 18 +- src/bin/pg_dump/pg_restore.c | 10 +- 13 files changed, 486 insertions(+), 405 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-01-13 22:49 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-01-13 22:49 pgsql: Access pg_dump's options structs through Archive struct, not dir Tom Lane <tgl@sss.pgh.pa.us> 2016-01-13 22:49 pgsql: Access pg_dump's options structs through Archive struct, not dir Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox