PostgreSQL subagent
-
-
Yes, please do.
-
Hi,
current subagent version reports the following SQL error on each poll:
SELECT CASE WHEN pg_is_in_recovery() THEN 'YES' ELSE 'NO' END AS in_recovery, CASE WHEN count(*) > 0 THEN 'YES' ELSE 'NO' END AS is_receiver FROM pg_catalog.pg_stat_wal_receiver 42P01 ERROR: relation "pg_catalog.pg_stat_wal_receiver" does not existIs it possible to somehow detect if this view is present and remove it from polling if not?
Best regards,
Victor -
-
It is 9.5.13. I will retest it on 9.6. I'm not sure about support for 9.5 - formally it is supported until 2021, but I don't know how widely it is used.
Best regards,
Victor -
-
Added it. Now I have a question regarding these lines:
"SELECT count(*) stanby FROM pg_catalog.pg_stat_replication
{ _T("PostgreSQL.Replication.Stanby(*)"), H_GlobalParameter, _T("REPLICATION/stanby"), DCI_DT_INT64, _T("PostgreSQL/Replication: WAL senders") },
shouldn't it be "standby"? Or even "PostgreSQL.Replication.WALSenders"?
I don't know meaning of this parameter, question is based purely on name and description difference

Best regards,
Victor -
It is number of WAL senders which 1:1 corresponds with the number of Standby servers receiving WAL form this master server.
I don't know which name or description is better, but you are right that the parameter name and its description should be unified. This means either rename the parameter to "PostgreSQL.Replication.WALSenders" as you suggest or change the description of the parameter in the documentation to "Number of Standby servers". -
Should it be "WAL receivers" or "WAL sending targets" then - as those servers receive data from current server, not send data to it?
-
The exact description of the pg_stat_replication table is: "One row per WAL sender process, showing statistics about replication to that sender's connected standby server."
The query counts the number of the rows in this table therefore it is number of senders (sender processes) on the monitored master server which corresponds with number of Standby servers on the other side receiving the data.
-
Now it makes sense
I think PostgreSQL.Replication.WALSenders will be the best name then.Best regards,
Victor -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login