powa-team / powa-archivist

powa-archivist: the powa PostgreSQL extension
http://powa.readthedocs.io/
PostgreSQL License
53 stars 20 forks source link

PG13: powa_take_snapshot(0): function "powa_statements_snapshot" failed: column pgss.total_time does not exist #35

Closed df7cb closed 3 years ago

df7cb commented 3 years ago

The code compiles with PG13, but this doesn't look good:

 SELECT powa_take_snapshot();
+WARNING:  powa_take_snapshot(0): function "powa_statements_snapshot" failed:
+              state  : 42703
+              message: column pgss.total_time does not exist
+              detail : 
+              hint   : 
+              context: PL/pgSQL function powa_statements_src(integer) line 4 at RETURN QUERY
+SQL statement "WITH capture AS(
+        SELECT *
+        FROM powa_statements_src(_srvid)
+    ),
...
rjuju commented 3 years ago

Thanks @df7cb . Indeed the definition of pg_stat_statements changed with pg13. As this is a compatbility break, I'll have to also change powa-web and bump a new minor version.

rjuju commented 3 years ago

@df7cb I just merged the PR. The compatibility issue should be fixed. I'll do some more testing and also update powa-web to handle the metrics before doing a release. I hope I can finish that during the weekend.

rjuju commented 3 years ago

FTR I finished the powa-web part yesterday and submitted a PR. I hope to get some review and publish the new versions soon

rjuju commented 3 years ago

FTR, since we're bumping the minor version this is an opportunity to do some improvements. I'm working on a way to have the collector retrieve the PG and various extensions versions and store that on the repository server. It'll reduce UI latency as we won't have to connect to the remote servers anymore to know if the various extraneous extensions are installed, and will also give complete info for configurations where connection on remote servers isn't allowed.

cpaelzer commented 3 years ago

Hi, I wanted to ask if there are any updates on this one to become released (or an ETA for it)?

rjuju commented 3 years ago

Hello, Yes, I'm terribly sorry that this got stuck for quite some time. For the record this got stuck with a bug on pg_stat_kcache (see https://github.com/powa-team/pg_stat_kcache/issues/24) which is now almost fixed. As correctly handling nested statements in pg_stat_kcache requires a change in the SRF, it's better to handle that in the same release, as any change in the SRF requires bumping the powa minor version, among many other things.

I hope I can release everything this week.

rjuju commented 3 years ago

I just released version 4.1.0! Packages should be following shortly. Sorry again for the long time to take care of that.