pgsql: Fix fd leak in pg_verifybackup

2020-12-06 Thread Michael Paquier
Fix fd leak in pg_verifybackup

An error code path newly-introduced by 87ae969 forgot to close a file
descriptor when verifying a file's checksum.

Per report from Coverity, via Tom Lane.

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/51c388987734cb318c8fa875f382ca75a34d0010

Modified Files
--
src/bin/pg_verifybackup/pg_verifybackup.c | 1 +
1 file changed, 1 insertion(+)



pgsql: pg_dump: Reorganize dumpBaseType()

2020-12-06 Thread Tom Lane
pg_dump: Reorganize dumpBaseType()

Along the same lines as ed2c7f65b and daa9fe8a5, reduce code duplication
by having just one copy of the parts of the query that are the same
across all server versions; and make the conditionals control the
smallest possible amount of code.  This is in preparation for adding
another dumpable field to pg_type.

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/04732962462ba99cf8f8bcf6ac83932867cc96a8

Modified Files
--
src/bin/pg_dump/pg_dump.c | 110 --
1 file changed, 39 insertions(+), 71 deletions(-)