powa-team / powa

PostgreSQL Workload Analyzer
http://powa.readthedocs.io/
PostgreSQL License
768 stars 57 forks source link

graph wal_bytes? #165

Closed stelb closed 1 year ago

stelb commented 1 year ago

Hello, I am currently trying to identify who/which statement is creating the current amount of wal, pg_stat_statements track this, but a graph would be handy, can this be implemented?

Regards

Stefan

rjuju commented 1 year ago

Hi,

It should already be the case since version 4.1.0:

The WAL info should be available in graphs and charts for the server, per-database and per-query.

stelb commented 1 year ago

Oops, ok, I can see wal_bytes attribute in powa_statements_history_current now, I see it in powa-web source, but not in webui.

stelb commented 1 year ago

searching in powa-web source I found this:

..
        if pgss18:
            # Add WALs graphs
..

pgss18 is a check for pg_stat_statements:

        pgss18 = self.has_extension_version(self.path_args[0],
                                            'pg_stat_statements', '1.8')

I have

│ pg_stat_statements │ 1.9     │ public     │ track planning and execution statistics of all SQL statements executed │
stelb commented 1 year ago

My bad, postgres has 1.9, powa db has 1.6 :-( I upgrade and hope it will work

stelb commented 1 year ago

OK, i forgot to upgrade the extensions in powa database. It's working now. Thank you!

rjuju commented 1 year ago

Great news, thanks a lot for the confirmation!