ansible/changelogs/fragments/53323-no-psycopg2-for-dump-and-restore.yaml
Glandos d784b77cb4 Remove dependency to psycopg2 with dump/restore (#53323)
* Remove dependency to psycopg2 with dump/restore

'dump' and 'restore' state only need pg_dump and pg_restore. These tools
don't use psycopg2 so this change tries to avoid the use of it in these
cases.

The db_exists test was replaced with an error detection when piping to
compression program, using a FIFO file. This effectively reverts #39483,
that was a fix for #39412.

* Fix typo

* Add changelog fragment

* Add note for dump and restore not requiring psycopg2

* Fix YAML syntax

* Update lib/ansible/modules/database/postgresql/postgresql_db.py

Co-Authored-By: Glandos <bugs-github@antipoul.fr>
2019-03-11 14:38:14 +00:00

8 lines
547 B
YAML

bugfixes:
- States ``dump`` and ``restore`` only need pg_dump and pg_restore. These tools
don't use psycopg2 so this change tries to avoid the use of it in these
cases. Fixes https://github.com/ansible/ansible/issues/35906
- Replace the fix for https://github.com/ansible/ansible/issues/39412
made in https://github.com/ansible/ansible/pull/39483 when using a compression
program. This now uses a FIFO file to ensure failure detection of pg_dump.
The Windows compatibility is completely dropped in this case.