Add on-segment mode for pg_dump utility #990
Open
+361
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add pg_dump on-segment mode, which makes pg_dump store data locally on segments
In this mode utility uses COPY ... TO PROGRAM ... ON SEGMENT instead of normal COPY and passes output of it to pg_dump utility on each segment.
To restore data it inserts COPY ... FROM PROGRAM ... ON SEGMENT operators into script in resulting dump, which read data from pg_dump utility on each segment.
This mode gets activated by using --on-segment flag, it generates dump on client side as usual and dumps on each used segment, compression level and archive formats are forwarded to segments' utilities and is used in generating resulting archives
Generated on the client dump can be used by pg_restore or psql (for plain texts) as usual
Also to manage data on segments 2 other system modes were added.
First one (--on-segment-internal-dump-mode) reads data from stdin to stores it locally with forwarded archive format and compression level.
Second (--on-segment-internal-restore-mode) reads stored data and passes it to stdout
They should not be friendly for common user