Hi everyone !
Summary
Since version 7.80.0 of the agent, even setting dbstrict: true and disabling database autodiscovery, the postgresql connects to databases other than the one specified in dbname.
Affected versions
The following agent versions were tested :
7.79.2 : Works fine
7.80.0 : Affected
7.81.1 : Affected
Reproducer
This should be a minimal reproducer :
# /etc/conf.d/postgres.d/conf.yaml
instances:
- dbm: true
host: <server_hostname>
port: 5432
username: <username>
password: <password>
dbname: database_1
dbstrict: true
Assuming there are 2 databases on the server (database_1 and database_2), with this configuration on one of the affected versions above, I can see the agent querying database_2 as well with pg_stat_activity. This, in turn, can block some postgres operations (such as dropping a database), because there are active sessions on said database.
Related issues
#24531 may be related, but I'm not certain.
Hi everyone !
Summary
Since version
7.80.0of the agent, even settingdbstrict: trueand disabling database autodiscovery, the postgresql connects to databases other than the one specified indbname.Affected versions
The following agent versions were tested :
7.79.2: Works fine7.80.0: Affected7.81.1: AffectedReproducer
This should be a minimal reproducer :
Assuming there are 2 databases on the server (
database_1anddatabase_2), with this configuration on one of the affected versions above, I can see the agent queryingdatabase_2as well withpg_stat_activity. This, in turn, can block some postgres operations (such as dropping a database), because there are active sessions on said database.Related issues
#24531 may be related, but I'm not certain.