We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With such primary slots:
[local]:10021 postgres@pgbench=# select * from pg_replication_slots ; slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn -----------+--------+-----------+--------+----------+-----------+--------+------------+---------+--------------+-------------+--------------------- abeille4 | ¤ | physical | ¤ | ¤ | f | t | 2454458 | 7995805 | ¤ | 8/AC000F60 | ¤ abeille2 | ¤ | physical | ¤ | ¤ | f | t | 2454173 | 7995805 | ¤ | 8/AC000F60 | ¤ abeille3 | ¤ | physical | ¤ | ¤ | f | f | ¤ | ¤ | ¤ | 8/A25AD5B0 | ¤
the oldest_xmin query
check_pgactivity/check_pgactivity
Line 5891 in 2595f39
datname | kind | age | xmin -----------+-------------+-----+------ postgres | repslot | ¤ | ¤ postgres | active_xact | ¤ | ¤ pgbench | query | ¤ | ¤ template1 | 2pc | ¤ | ¤ template1 | idle_xact | ¤ | ¤ pgbench | repslot | ¤ | ¤ pgbench | active_xact | ¤ | ¤ postgres | query | ¤ | ¤ template1 | walsender | ¤ | ¤ template1 | repslot | ¤ | ¤ pgbench | idle_xact | ¤ | ¤ template1 | active_xact | ¤ | ¤ pgbench | walsender | ¤ | ¤ postgres | 2pc | ¤ | ¤ postgres | idle_xact | ¤ | ¤ postgres | walsender | ¤ | ¤ template1 | query | ¤ | ¤ pgbench | 2pc | ¤ | ¤
although the part of the query that queries it is okay:
SELECT 'repslot' AS kind, pgbench-# database AS datname, pgbench-# xmin AS xmin pgbench-# FROM pg_replication_slots; kind | datname | xmin ---------+---------+--------- repslot | ¤ | 7995805 repslot | ¤ | 7995805 repslot | ¤ | ¤
The datname is empty and it is filtered in the RIGHT JOIN at the end.
datname
RIGHT JOIN
When replacing it with a FULL OUTER JOIN and adding 2 COALESCE, I obtain this, which is much more useful:
FULL OUTER JOIN
datname | kind | age | xmin -----------+-------------+-----+--------- ¤ | active_xact | ¤ | ¤ ¤ | repslot | 0 | 7995805 ¤ | walsender | ¤ | ¤ postgres | repslot | ¤ | ¤ postgres | active_xact | ¤ | ¤ pgbench | query | ¤ | ¤ template1 | 2pc | ¤ | ¤ template1 | idle_xact | ¤ | ¤ pgbench | repslot | ¤ | ¤ pgbench | active_xact | ¤ | ¤ postgres | query | ¤ | ¤ template1 | walsender | ¤ | ¤ template1 | repslot | ¤ | ¤ pgbench | idle_xact | ¤ | ¤ template1 | active_xact | ¤ | ¤ pgbench | walsender | ¤ | ¤ postgres | 2pc | ¤ | ¤ postgres | idle_xact | ¤ | ¤ postgres | walsender | ¤ | ¤ template1 | query | ¤ | ¤ pgbench | 2pc | ¤ | ¤
I'm wondering it this should not have been a LEFT JOIN from the beginning. So many empty values pollute the perfdata.
LEFT JOIN
Or did I miss something?
The text was updated successfully, but these errors were encountered:
ioguix
No branches or pull requests
With such primary slots:
the oldest_xmin query
check_pgactivity/check_pgactivity
Line 5891 in 2595f39
returns an empty result:
although the part of the query that queries it is okay:
The
datname
is empty and it is filtered in theRIGHT JOIN
at the end.When replacing it with a
FULL OUTER JOIN
and adding 2 COALESCE, I obtain this, which is much more useful:I'm wondering it this should not have been a
LEFT JOIN
from the beginning.So many empty values pollute the perfdata.
Or did I miss something?
The text was updated successfully, but these errors were encountered: