forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbedc1f0
committed
Rework code defining default compression for dir/custom formats in pg_dump
As written, pg_dump would call twice parse_compress_specification() forthe custom and directory formats to build a compression specification ifno compression option is defined, as these formats should be compressedby default when compiled with zlib, or use no compression without zlib.This made the code logic quite confusing, and the first compressionspecification built would be incorrect before being overwritten by thesecond one.Rather than creating two compression specifications, this commit changesa bit the order of the checks for the compression options so ascompression_algorithm_str is now set to a correct value for the customand format directory when no compression option is defined. This makesthe code easier to understand, as parse_compress_specification() is nowcalled once for all the format, with or without user-specifiedcompression methods. One comment was also confusing for the non-zlibcase, so remove it while on it.This code has been introduced in5e73a60 when adding support forcompression specifications in pg_dump.Per discussion with Justin Pryzby and Georgios Kokolatos.Discussion:https://postgr.es/m/20230225050214.GH1653@telsasoft.com1 parent7b7fa85 commitbedc1f0
1 file changed
+15
-15
lines changedLines changed: 15 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
721 | 721 |
| |
722 | 722 |
| |
723 | 723 |
| |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
724 | 739 |
| |
725 | 740 |
| |
726 | 741 |
| |
| |||
749 | 764 |
| |
750 | 765 |
| |
751 | 766 |
| |
752 |
| - | |
753 |
| - | |
754 |
| - | |
755 |
| - | |
756 |
| - | |
757 |
| - | |
758 |
| - | |
759 |
| - | |
760 |
| - | |
761 |
| - | |
762 |
| - | |
763 |
| - | |
764 |
| - | |
765 |
| - | |
766 |
| - | |
767 | 767 |
| |
768 | 768 |
| |
769 | 769 |
| |
|
0 commit comments
Comments
(0)