TIL: In pg_dump, beware the combo of "-Fd" and "-Z"

Поиск
Список
Период
Сортировка
От Ron
Тема TIL: In pg_dump, beware the combo of "-Fd" and "-Z"
Дата
Msg-id 1ad81a44-b39e-5854-ba82-0bd1b61bef25@gmail.com
обсуждение исходный текст
Ответы Re: TIL: In pg_dump, beware the combo of "-Fd" and "-Z"
Список pgsql-admin
PostgreSQL 12.1-2.module+el8.1.1+4794+c82b6e09 from the RHEL 8.3 
repository.  (Installing software outside of the RHEL is Against Policy.)

For a project using 9.6, I have this command backing up a database:
pg_dump -d ${DB} -j ${THREADS} -Fd -Z0 -v -f $DB 2> ${DB}_pgdump.log

So, for the 12 project, I copied it over, removing the "0", since I want 
these backups compressed.
pg_dump -d ${DB} -j ${THREADS} -Fd -Z -v -f $DB 2> ${DB}_pgdump.log

Since the -Z default is "6", I assumed that would compress the backup.  It 
didn't, acting instead like "-Z0".  Removing "-Z" made it compress.

This surprised me, and is very counter-intuitive.  A bug?


-- 
Angular momentum makes the world go 'round.



В списке pgsql-admin по дате отправления:

Предыдущее
От: lazaro garcia
Дата:
Сообщение: Re: Table Partitioning
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: TIL: In pg_dump, beware the combo of "-Fd" and "-Z"