-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgreSQL info module fails with Cannot execute SQL syntax error at or near "b'oid'" #790
Comments
Hi @chriscroome , which version of psycopg are you using? |
Thanks @betanummeric the server had both versions: aptitude search psycopg
p python-psycopg-doc - PostgreSQL database adapter for Python 3 (documentation package)
p python-psycopg2-doc - Python module for PostgreSQL (documentation package)
i python3-psycopg - PostgreSQL database adapter for Python 3
p python3-psycopg-pool - PostgreSQL database adapter for Python 3: connection pool
i python3-psycopg2 - Python 3 module for PostgreSQL
p python3-psycopg2cffi - implementation of the psycopg2 module using cffi
v python3-types-psycopg2 - Doing |
@chriscroome if you could test the following solutions manually by finding the module in your local setup, backing it up, editing the same as in the following PRs and test (one by one), it'd be great: |
We need manual testing for ^. If no feedback / opportunity to test it in near future, we should close the PRs to keep the tracker clean |
I have installed both modules on a development server: aptitude search python3-psycopg
i python3-psycopg - PostgreSQL database adapter for Python 3
p python3-psycopg-pool - PostgreSQL database adapter for Python 3: connection pool
i python3-psycopg2 - Python 3 module for PostgreSQL
p python3-psycopg2cffi - implementation of the psycopg2 module using cffi And have these versions of the collection locally: ansible-galaxy collection list | grep -i postgresql
community.postgresql 3.10.2
community.postgresql 3.9.0 After removing aptitude search python3-psycopg
i python3-psycopg - PostgreSQL database adapter for Python 3
p python3-psycopg-pool - PostgreSQL database adapter for Python 3: connection pool
p python3-psycopg2 - Python 3 module for PostgreSQL
p python3-psycopg2cffi - implementation of the psycopg2 module using cffi The community.postgresql.postgresql_info module runs without an error. After installing aptitude search python3-psycopg
p python3-psycopg - PostgreSQL database adapter for Python 3
p python3-psycopg-pool - PostgreSQL database adapter for Python 3: connection pool
i python3-psycopg2 - Python 3 module for PostgreSQL
p python3-psycopg2cffi - implementation of the psycopg2 module using cffi After uninstalling both: aptitude search python3-psycopg
p python3-psycopg - PostgreSQL database adapter for Python 3
p python3-psycopg-pool - PostgreSQL database adapter for Python 3: connection pool
p python3-psycopg2 - Python 3 module for PostgreSQL
p python3-psycopg2cffi - implementation of the psycopg2 module using cffi I get this error running the TASK [postgresql : Gather PostgreSQL info] *************************************************************************************************************************************************************************************************************************************
task path: /home/chris/webarch/postgresql/tasks/info.yml:40
fatal: [nextcloud.webarch.org.uk]: FAILED! =>
changed: false
invocation:
module_args:
ca_cert: null
connect_params: {}
db: postgres
filter:
- databases
- roles
- version
login_db: postgres
login_host: ''
login_password: ''
login_unix_socket: ''
login_user: postgres
port: 5432
session_role: null
ssl_cert: null
ssl_key: null
ssl_mode: prefer
trust_input: true
msg: Failed to import the required Python library (psycopg2) on nextcloud.webarch.org.uk's
Python /usr/bin/python3. Please read the module documentation and install it in
the appropriate location. If the required library is installed, but Ansible is
using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter So I'm afraid I'm unable to replicate the original error, so I'm afraid I don't think I'm in a position to test the patches in a meaningful way? Or should I roll back to |
SUMMARY
On a new Debian 12 server the info module is failing for me with:
ISSUE TYPE
COMPONENT NAME
community.postgresql.postgresql_info module
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Debian 12.9
STEPS TO REPRODUCE
I'm using this role with the following config:
This is the task in question.
EXPECTED RESULTS
Not a failure, the thing I don't understand is that the tests I have for this role that are run via Molecule / GitLab CI don't fail.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: