Skip to content
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

PR 16911 PostgreSQL: Add system_identifier breaks postgres.can_connect against PostgreSQL 9.2 systems #17485

Open
anordby opened this issue Apr 30, 2024 · 0 comments

Comments

@anordby
Copy link

anordby commented Apr 30, 2024

In RHEL 7 after upgrading datadog-agent to version 7.53.0-1, postgres.can_connect fails against PostgreSQL 9.2 systems due to above mentioned change utilizing unsupported pg_control_system:

Apr 30 12:50:04 no000010sladm1 agent: 2024-04-30 12:50:04 CEST | CORE | ERROR | (pkg/collector/python/datadog_agent.go:129 in LogMessage) | postgres:28e87c56525f3d28 | (postgres.py:239) | Unhandled exception while using database connection ecom_order_management
Apr 30 12:50:04 no000010sladm1 agent: Traceback (most recent call last):
Apr 30 12:50:04 no000010sladm1 agent: File "/opt/datadog-agent/embedded/lib/python3.11/site-packages/datadog_checks/postgres/postgres.py", line 224, in db
Apr 30 12:50:04 no000010sladm1 agent: yield self._db
Apr 30 12:50:04 no000010sladm1 agent: File "/opt/datadog-agent/embedded/lib/python3.11/site-packages/datadog_checks/postgres/postgres.py", line 207, in execute_query_raw
Apr 30 12:50:04 no000010sladm1 agent: cursor.execute(query)
Apr 30 12:50:04 no000010sladm1 agent: psycopg2.errors.UndefinedFunction: function pg_control_checkpoint() does not existApr 30 12:50:04 no000010sladm1 agent: LINE 4: FROM pg_control_checkpoint();
Apr 30 12:50:04 no000010sladm1 agent: ^
Apr 30 12:50:04 no000010sladm1 agent: HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Apr 30 12:50:04 no000010sladm1 agent: 2024-04-30 12:50:04 CEST | CORE | ERROR | (pkg/collector/python/datadog_agent.go:129 in LogMessage) | - | (core.py:94) | Error querying pg_control_checkpoint: function pg_control_checkpoint() does not exist
Apr 30 12:50:04 no000010sladm1 agent: LINE 4: FROM pg_control_checkpoint();
Apr 30 12:50:04 no000010sladm1 agent: ^

The change causing this seems to be: #16911

Additional environment details (Operating System, Cloud provider, etc):

RHEL 7, x64

Steps to reproduce the issue:

  1. Install datadog-agent version 7.53.0-1
  2. Setup postgres monitoring of PostgreSQL 9.2 server with above datadog-agent version
  3. See that it fails!

Additional information you deem important (e.g. issue happens only occasionally):

Happens always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant