
As written, pg_dump would call twice parse_compress_specification() for the custom and directory formats to build a compression specification if no compression option is defined, as these formats should be compressed by default when compiled with zlib, or use no compression without zlib. This made the code logic quite confusing, and the first compression specification built would be incorrect before being overwritten by the second one. Rather than creating two compression specifications, this commit changes a bit the order of the checks for the compression options so as compression_algorithm_str is now set to a correct value for the custom and format directory when no compression option is defined. This makes the code easier to understand, as parse_compress_specification() is now called once for all the format, with or without user-specified compression methods. One comment was also confusing for the non-zlib case, so remove it while on it. This code has been introduced in 5e73a60 when adding support for compression specifications in pg_dump. Per discussion with Justin Pryzby and Georgios Kokolatos. Discussion: https://postgr.es/m/20230225050214.GH1653@telsasoft.com
PostgreSQL Database Management System ===================================== This directory contains the source code distribution of the PostgreSQL database management system. PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings. PostgreSQL has many language interfaces, many of which are listed here: https://www.postgresql.org/download/ See the file INSTALL for instructions on how to build and install PostgreSQL. That file also lists supported operating systems and hardware platforms and contains information regarding any other software packages that are required to build or run the PostgreSQL system. Copyright and license information can be found in the file COPYRIGHT. A comprehensive documentation set is included in this distribution; it can be read as described in the installation instructions. The latest version of this software may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.
Description
Languages
C
85.7%
PLpgSQL
5.8%
Perl
4.1%
Yacc
1.3%
Makefile
0.7%
Other
2.3%