cybertec-postgresql / pg_squeeze

A PostgreSQL extension for automatic bloat cleanup
Other
470 stars 31 forks source link

Monitoring squeeze #44

Closed Dsolik closed 7 months ago

Dsolik commented 3 years ago

Tell me what sql query can make sure squeeze is running?

Dsolik commented 3 years ago

Can I use the following query for monitoring: select count(*) from pg_stat_activity where wait_event='Extension' and query like '%squeeze.tasks%'; 0 - squeeze not runing, 1 - squeeze runing

ahouska commented 3 years ago

I don't think this is the best way because even the "scheduler worker" accesses the "tasks" table. If you're checking for the actual squeezing, the query should contain the function name "squeeze_table".

Dsolik commented 3 years ago

For unknown reasons, squeeze stops working, and the tables begin to bloat, if you squeeze.start, then squeeze begins to work. I want to track the moments when squeeze stops working.

ahouska commented 3 years ago

The PG server log is the first thing you need to check. Do you see any errors around the time pg_squeeze stops working?

ahouska commented 3 years ago

There's actually more to check: the tables squeeze.log and squeeze.errors.

kovmir commented 7 months ago

Answered, stale.