-
Notifications
You must be signed in to change notification settings - Fork 801
Closed
Description
What did you do?
Simply running exporter 0.0.1-rev (built with go1.15.8)
What did you expect to see?
I expect no errors
What did you see instead? Under which circumstances?
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
STATEMENT:
SELECT slot_name, database, active, pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)
FROM pg_replication_slots
Environment
-
System information:
insert output of
uname -srmhere
Linux 5.4.0-66-generic x86_64 -
postgres_exporter version:
insert output of
postgres_exporter --versionhere
postgres_exporter 0.0.1-rev (built with go1.15.8) -
postgres_exporter flags:
/opt/postgres_exporter/postgres_exporter --web.listen-address=:9187 --log.level=warn --extend.query-path=/opt/postgres_exporter/queries.yaml
-
PostgresSQL version:
insert PostgreSQL version here
11.8 -
Logs:
insert logs relevant to the issue here
While looking here
postgres_exporter/cmd/postgres_exporter/postgres_exporter.go
Lines 431 to 443 in 134e908
| "pg_replication_slots": { | |
| { | |
| semver.MustParseRange(">=9.4.0 <10.0.0"), | |
| ` | |
| SELECT slot_name, database, active, pg_xlog_location_diff(pg_current_xlog_location(), restart_lsn) | |
| FROM pg_replication_slots | |
| `, | |
| }, | |
| { | |
| semver.MustParseRange(">=10.0.0"), | |
| ` | |
| SELECT slot_name, database, active, pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn) | |
| FROM pg_replication_slots |
I see no pg_is_in_recovery check
TsaorKG, mhbahmani and roock
Metadata
Metadata
Assignees
Labels
No labels