gpbackup icon indicating copy to clipboard operation
gpbackup copied to clipboard

gpbackup binary backup support

Open CC-Hsu opened this issue 3 years ago • 1 comments

Hi,

As far as I know, GPDB supports COPY ... WITH (FORMAT BINARY) option, which might be faster than normal text file output. https://gpdb.docs.pivotal.io/latest/ref_guide/sql_commands/COPY.html

And it seems that gpbackup utilize COPY ... ON SEGMENT command under the hood.

Maybe gpbackup team can consider to support --binary option for gpbackup.

Best Regards.

CC-Hsu avatar Apr 25 '21 12:04 CC-Hsu

Hello,

Thanks, this is something that can be considered... although I'm not quite convinced at how much gpbackup would gain from having this option. We would need to ponder why pg_dump has not introduced the option to do binary format COPY. I imagine it is because of concern over portability.

From Postgres documentation for reference:

The binary format option causes all data to be stored/read as binary format rather than as text. It is somewhat faster than the text and CSV formats, but a binary-format file is less portable across machine architectures and PostgreSQL versions. Also, the binary format is very data type specific; for example it will not work to output binary data from a smallint column and read it into an integer column, even though that would work fine in text format.

- Jimmy

jimmyyih avatar Apr 28 '21 22:04 jimmyyih