Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Max. table FREEZE age shows High values for Partitioned tables #760

Closed
AnDBAIdewe opened this issue Mar 25, 2024 · 2 comments
Closed

Max. table FREEZE age shows High values for Partitioned tables #760

AnDBAIdewe opened this issue Mar 25, 2024 · 2 comments
Assignees

Comments

@AnDBAIdewe
Copy link

Since PG15, the pg_stat_user_tables includes partitioned tables (relkind 'p'). The age(relfrozenxid) of this tables is always 2147483647, which results in a red-flagged "Max. table FREEZE age" in Health check dashboard. It would make sense to exclude partitioned tables from this metric, as it conceales real data metrics. The partitions each act as a normal table (relkind 'r') and are properly monitored.
Same behavior is noticed with PgWatch2 V1.10.0 and PgWatch2-postgres V1.12.0, even after updating metric definitions.

PG14:
select s.relname, relkind, age(relfrozenxid) from pg_class p , pg_stat_user_tables s where p.relname=s.relname and s.relname like 'analytics_cycle_analytics_issue%' order by age(relfrozenxid) desc, s.relname;
relname | relkind | age
-------------------------------------------------+---------+------------
analytics_cycle_analytics_issue_stage_events_00 | r | 321
analytics_cycle_analytics_issue_stage_events_01 | r | 321
analytics_cycle_analytics_issue_stage_events_02 | r | 321

PG15:
select s.relname, relkind, age(relfrozenxid) from pg_class p , pg_stat_user_tables s where p.relname=s.relname and s.relname like 'analytics_cycle_analytics_issue%' order by age(relfrozenxid) desc, s.relname;
relname | relkind | age
-------------------------------------------------+---------+------------
analytics_cycle_analytics_issue_stage_events | p | 2147483647
analytics_cycle_analytics_issue_stage_events_00 | r | 321
analytics_cycle_analytics_issue_stage_events_01 | r | 321
analytics_cycle_analytics_issue_stage_events_02 | r | 321

@pashagolub
Copy link
Collaborator

Sorry for delay in answer and thanks for pointing this out!

Can you, please, confirm #783 is solving this issue for you?

Thanks in advance!

@github-project-automation github-project-automation bot moved this from Todo to Done in pgwatch2 May 21, 2024
@AnDBAIdewe
Copy link
Author

AnDBAIdewe commented May 27, 2024 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants