powa-team / powa-web

PoWA user interface
http://powa.readthedocs.io/
73 stars 31 forks source link

pg_track_settings timeline is missing #132

Closed aleszeleny closed 3 years ago

aleszeleny commented 3 years ago

Hello,

I have installed pg_track_settings in version 2.0.1 on the monitored database instance. We are using the remote configuration and in the powa-web, there is no timeline for changes. I have changed random_page_cost from default 4 to 1 just to see if the timeline appears.

In the settings, new values is displayed: image

but I can't find it on the main page for the selected cluster (change using alter system & reload): image

Is there some configuration I've missed to set up properly?

I've expected to see the change like on the track settings manual page: https://powa.readthedocs.io/en/v4/components/stats_extensions/pg_track_settings.html

Thanks, ales

rjuju commented 3 years ago

Hello,

Since you're using the remote mode, you have to tell the repository server that a new extension has to be handled. Did you call powa_activate_extension() for that? Something like:

SELECT powa_activate_extension(1, 'pg_track_settings');

On your repository server, assuming that this is indeed for the remote server 1.

Also note that pg_track_settings is handled a bit differently than other extension, as it provides its own storage. You therefore also need to install it on your repository server in the dedicated powa database.

rjuju commented 3 years ago

I forgot to mention that if that fixes your problem, it means that there's a bug in the config page, as it indicates that everything is setup correctly.

aleszeleny commented 3 years ago

Hello, I haven't activated the extension using SELECT powa_activate_extension(1, 'pg_track_settings');, since I list it during test server preparation:

SELECT powa_register_server(hostname => '127.0.0.1',
    alias => 'pgtest',
    port => 5433,
    username => 'powa',
    password => 'super_secret_test',
    extensions => '{pg_stat_statements, pg_qualstats, pg_stat_kcache, pg_track_settings, pg_wait_sampling}');

Expecting it'll have the same effect. Might it be the issue?

I've tried to get the list of testing server extensions:

powa=# SELECT ps.alias, pe.* FROM powa_servers ps INNER JOIN powa_extensions pe ON ps.id = pe.srvid where ps.alias = 'pgtest';
 alias  | srvid |      extname       | version 
--------+-------+--------------------+---------
 pgtest |     1 | pg_stat_statements | 1.8
 pgtest |     1 | powa               | 4.1.2
 pgtest |     1 | pg_qualstats       | 2.0.2
 pgtest |     1 | pg_stat_kcache     | 2.2.0
 pgtest |     1 | pg_track_settings  | 2.0.1
 pgtest |     1 | pg_wait_sampling   | 1.1
(6 rows)

I can, of sure use SELECT powa_activate_extension(1, 'pg_track_settings'); if it might help. Shall I do that?

And yes, on the powa database in repository Postgres cluster I have pg_track_settings extension installed:

powa=# \dx
                                            List of installed extensions
        Name        | Version |   Schema   |                              Description                               
--------------------+---------+------------+------------------------------------------------------------------------
 btree_gist         | 1.5     | public     | support for indexing common datatypes in GiST
 hypopg             | 1.1.4   | public     | Hypothetical indexes for PostgreSQL
 pg_qualstats       | 2.0.2   | public     | An extension collecting statistics about quals
 pg_stat_kcache     | 2.2.0   | public     | Kernel statistics gathering
 pg_stat_statements | 1.8     | public     | track planning and execution statistics of all SQL statements executed
 pg_track_settings  | 2.0.1   | public     | Track settings changes
 pg_wait_sampling   | 1.1     | public     | sampling based statistics of wait events
 plpgsql            | 1.0     | pg_catalog | PL/pgSQL procedural language
 powa               | 4.1.2   | public     | PostgreSQL Workload Analyser-core
(9 rows)

The difference is that the repository cluster is PostgreSQL 13.2. The monitored cluster ("pgtest") is running the same version, but I'd like to monitor also 12.4 and 12.5 instances.

Thanks, Ales

P.S.: Is it possible to register the server and instead of host/port/user[/password] use the service file entry? (in that case, service uniqueness is needed, so I assume one has to choose whether to use IP/port or services... if service is supported [I'll be happy to have a chance to use services..] ).

rjuju commented 3 years ago

I haven't activated the extension using SELECT powa_activate_extension(1, 'pg_track_settings');, since I list it during test server preparation:

Ah, I assumed that you added the extension after the initial activation. Indeed, you activated the remote server correctly so no further action should be required to make it work. At least it seems that that config page is working as expected.

I can, of sure use SELECT powa_activate_extension(1, 'pg_track_settings'); if it might help. Shall I do that?

It's not needed, and should be a no-op given your current state.

And yes, on the powa database in repository Postgres cluster I have pg_track_settings extension installed:

Perfect!

The difference is that the repository cluster is PostgreSQL 13.2. The monitored cluster ("pgtest") is running the same version, but I'd like to monitor also 12.4 and 12.5 instances.

It shouldn't be a problem, powa takes care of handling the various incompatibilities between PG versions through the dedicated source function (https://powa.readthedocs.io/en/latest/components/powa-archivist/development.html#functions-required-for-data-snapshot).

So apparently something else is going on. Can you check if snapshot of pg_track_setting is working as expected? On the powa database of the repository server. For instance:

-- should return the current configuration of your remote server
SELECT * FROM pg_track_settings(now(), 1)

-- list all known configuration options
SELECT * FROM pg_track_settings_list WHERE srvid = 1;

-- list every setting change recorded
SELECT * FROM pg_track_settings_history WHERE srvid = 1;

Does those queries return sensible data?

P.S.: Is it possible to register the server and instead of host/port/user[/password] use the service file entry? (in that case, service uniqueness is needed, so I assume one has to choose whether to use IP/port or services... if service is supported [I'll be happy to have a chance to use services..] ).

It's not possible at the moment given how connection are done in powa-collector and powa-web, but psycopg2 does support it so it would be possible to support it. This would however raise some question (what to display in the server list, how to properly store that in powa_servers, how to handle things like $PGSERVICEFILE and so on). Please open an issue at https://github.com/powa-team/powa/issues so I don't forget to work on that. If you have any opinion on some of the details I mention feel free to add it too that will be helpful!

aleszeleny commented 3 years ago

Hello, generally yes, all the queries return expected data. To make the long listings (375 different tracked settings values) I've added name predicate to filter it only to a value I've used for testing change tracking:

powa=# -- should return the current configuration of your remote server
SELECT * FROM pg_track_settings(now(), 1) where name = 'random_page_cost';
       name       | setting | setting_pretty 
------------------+---------+----------------
 random_page_cost | 1       | 1
(1 row)
powa=# SELECT * FROM pg_track_settings_list WHERE srvid = 1 AND name = 'random_page_cost';
 srvid |       name       
-------+------------------
     1 | random_page_cost
(1 row)

And here it is exactly what is expected - the change is recorded:

powa=#    SELECT * FROM pg_track_settings_history WHERE srvid = 1 AND name = 'random_page_cost';
 srvid |              ts               |       name       | setting | is_dropped | setting_pretty 
-------+-------------------------------+------------------+---------+------------+----------------
     1 | 2021-02-18 00:36:23.352788+01 | random_page_cost | 4       | f          | 4
     1 | 2021-03-08 11:58:38.743238+01 | random_page_cost | 1       | f          | 1
(2 rows)

If there is something more I can check, just let me know.

Thanks Ales

rjuju commented 3 years ago

Thanks, so it looks like all the data is correctly stored, so the problem is on the UI part.

Which version of powa-web are you using? Is there anything specific on powa-web configuraiton?

Do you see any error in the browser js console? Are you choosing a time interval that contains configuration change ?

Could you also check in the network inspector if the call for the config changes returns any data? It should be something like

/server/1/config_changes/?from=....
aleszeleny commented 3 years ago

Sorry, how can I open "browser js console" to check it? (I'm using Firefox or Chrome)? I'll check the network traffic using tcpudump and let you know.

rjuju commented 3 years ago

That should be part of the "developer tool". It's usually shown using "f12" or "ctrl-shift-j" or "ctrl-shift-i" depending on the browser, see https://developers.google.com/web/tools/chrome-devtools or https://developer.mozilla.org/en-US/docs/Tools

The network part of the developer tool wiill probably be faster to use at it will also display the specific request, header, response and such nicely formatted.

aleszeleny commented 3 years ago

Thanks for the hint!

Here are the observation results: Powa web ( and other powa packages version):

powa_13-4.1.2-1.rhel7.x86_64
powa_13-web-4.1.2-1.rhel7.x86_64
powa-collector-1.1.0-1.rhel7.noarch

Console (warnings only):

powa.min-all.js?v=2ff9f5f9e99d5d5d5d563a9652883769:1 Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.
Gt.r.moment @ powa.min-all.js?v=2ff9f5f9e99d5d5d5d563a9652883769:1
powa.min-all.js?v=2ff9f5f9e99d5d5d5d563a9652883769:1 hasPrevious has been deprecated, use hasPreviousPage instead
hasPrevious @ powa.min-all.js?v=2ff9f5f9e99d5d5d5d563a9652883769:1
powa.min-all.js?v=2ff9f5f9e99d5d5d5d563a9652883769:1 hasNext has been deprecated, use hasNextPage instead
hasNext @ powa.min-all.js?v=2ff9f5f9e99d5d5d5d563a9652883769:1
powa.min-all.js?v=2ff9f5f9e99d5d5d5d563a9652883769:1 hasPrevious has been deprecated, use hasPreviousPage instead
hasPrevious @ powa.min-all.js?v=2ff9f5f9e99d5d5d5d563a9652883769:1
powa.min-all.js?v=2ff9f5f9e99d5d5d5d563a9652883769:1 hasNext has been deprecated, use hasNextPage instead
hasNext @ powa.min-all.js?v=2ff9f5f9e99d5d5d5d563a9652883769:1
....

I've tried to get part of the page containing: graph_timeline rickshaw_annotation_timeline:

<div class="columns large-10 small-10">        <div class="row">        <div class="graph_container rickshaw_graph"><svg width="727" height="300"><path class="path" d="M0,13.428847566515213L7.295224901868307,19.555775031365265L14.558551964508665,13.991011379738483L21.831027981283942,14.065858117093633L29.094698438949823,16.50717574641172L36.35776433750036,14.696726331543331L43.63017471147077,33.610365001633845L50.892573148516924,14.658375358565968L58.18893217639836,29.05802872180292L65.45197770028541,12.762695584992144L72.71548496988095,13.835897729946057L79.97889671670352,21.738701120154293L87.25041895185188,7.736594646217521L94.50619726628449,15.634042098461586L101.76956167734654,18.62425268826272L109.06652054040794,21.343113575358753L116.33847956214815,20.6090976388019L123.60118003978609,14.106789289920973L130.86457536257458,12.841086914009814L138.12804377816067,18.913074911476556L145.3905630683653,11.334866498277874L152.6625097787464,32.53898071226617L159.92507006442315,16.145462734708772L167.20877867440652,27.11461072228841L174.48057252865928,20.558654702615474L181.74371107489497,15.511775202893707L189.00731941578502,16.108811049058957L196.27004725245462,14.22145141537159L203.54147981487938,15.479938400006056L210.804049099212,12.949218739790712L218.08781357183355,14.137153471772379L225.3506548793588,15.407999551775998L232.62256166089668,12.403145945352122L239.88612148863203,15.117730741238667L247.14909682628527,39.291021171353314L254.41139383102404,14.753796346394921L261.68336766659894,29.25411287830214L268.98203144983,13.264947427990293L276.24529447781373,14.127199129367318L283.5084788275565,21.73652133513514L290.7708826428738,15.35116186230594L298.04228659913156,14.734525779026587L305.30524713115494,13.65233057075641L312.56865323304913,13.323209632012667L319.8774188556635,13.084825534574051L327.1406698820207,13.746575498994584L334.4037599130504,26.475316250456338L341.66647936027334,13.60260158996196L348.92996122358863,13.978025486293987L356.20267561551674,31.897355962327246L363.4661501744751,55.2560219547129L370.76516796979183,22.342558733317862L378.0376061479064,11.836031703178218L385.30165476039315,11.136722256678178L392.5654439728302,170.86983126415095L399.8374192114324,61.04199002243212L407.1009918161514,15.444593226875082L414.3649804615298,22.077556243769493L421.65963265341196,10.938784306549653L428.9232368816271,11.213178860329066L436.195409647597,10.541559447302495L443.45977139771867,12.237254768663098L450.7239078060724,11.73736749580694L457.99623351432143,11.511770640495723L465.2598786539091,31.855530242347886L472.57195932842285,14.381152998654068L479.83590895774626,10.776139744712221L487.09952207590317,9.564255109249597L494.3715012979541,32.714121897317824L501.6343172586841,12.518934043175244L508.8973576812133,12.283659315921625L516.1603984073215,12.424073070068719L523.423889732866,52.49461222276709L530.7325233211791,12.499915609651513L537.9965344990934,12.201162248793096L545.2687297114484,24.174839390120074L552.5319455226416,11.522555525421874L559.7962266069005,9.683596287963725L567.0605781030262,8.306157503455736L574.3255542026858,11.010254259369546L581.6212860425093,13.457539627136505L588.8843186724937,10.938523117383191L596.1475186627085,2.970297029702973L603.419717856461,32.16524336872729L610.6825525898599,11.36390266119629L617.9462204671044,9.812368580818998L625.209746207841,33.27286393138914L632.5186093264919,18.16276789063822L639.7824454849596,23.761153659059232L647.0457598916377,6.866204476892035L654.3191152537,10.819790909081629L661.5833220493062,12.438103720706206L668.8464018058278,12.768454484549041L676.1180363775129,24.133314528505935L683.403462364661,13.066620099087078L690.6751037135422,23.891406496744537L697.9377464804022,12.888457550439004L705.2011601348496,13.577631264983768L712.4643372848471,20.830984077770577L719.7277611953417,13.500734629575916L727,12.386449352452388" fill="none" stroke="#cb513a" stroke-width="2"></path><path class="path" d="M0,181.71443653399348L7.295224901868307,183.73503675530637L14.558551964508665,181.57719532918426L21.831027981283942,181.4646625113499L29.094698438949823,182.46693980368366L36.35776433750036,181.8683322390907L43.63017471147077,189.54758683429438L50.892573148516924,182.24024546561242L58.18893217639836,187.6700726799643L65.45197770028541,180.92175511043934L72.71548496988095,181.36510589499173L79.97889671670352,184.77003513082343L87.25041895185188,178.70905130142438L94.50619726628449,182.1097933202443L101.76956167734654,183.88649858834884L109.06652054040794,184.6131505981784L116.33847956214815,184.1617242002659L123.60118003978609,181.4771412581138L130.86457536257458,180.95361654684453L138.12804377816067,183.45562862212662L145.3905630683653,180.46871152100545L152.6625097787464,189.1058330127228L159.92507006442315,182.65050221829034L167.20877867440652,187.0004581270257L174.48057252865928,184.14779796372457L181.74371107489497,182.0630656523545L189.00731941578502,182.29630354863704L196.27004725245462,181.65562961588864L203.54147981487938,182.03299228324275L210.804049099212,181.33003967926987L218.08781357183355,181.48068928489195L225.3506548793588,182.15467910938307L232.62256166089668,180.77356148764113L239.88612148863203,181.88941826664427L247.14909682628527,191.90143210828526L254.41139383102404,181.88487242724835L261.68336766659894,188.29915257373077L268.98203144983,181.12597339825442L276.24529447781373,181.48216010564593L283.5084788275565,184.6244526055113L290.7708826428738,182.1229927068494L298.04228659913156,181.73030254414465L305.30524713115494,181.28891231793526L312.56865323304913,181.890057999454L319.8774188556635,181.05110228537296L327.1406698820207,181.3228191060629L334.4037599130504,186.59421360882774L341.66647936027334,181.269534612841L348.92996122358863,181.57570014851433L356.20267561551674,188.21867469324673L363.4661501744751,176.5300492476295L370.76516796979183,185.03457822283815L378.0376061479064,180.54649639389345L385.30165476039315,180.25233326078117L392.5654439728302,181.7540699927274L399.8374192114324,177.16250423825457L407.1009918161514,182.04139083163327L414.3649804615298,185.27528479532594L421.65963265341196,180.16722680439173L428.9232368816271,180.4220399297088L436.195409647597,180.01506709168973L443.45977139771867,180.7142583948921L450.7239078060724,180.64160097108925L457.99623351432143,180.40543670341413L465.2598786539091,189.57540170606114L472.57195932842285,181.599920064527L479.83590895774626,180.09994782734745L487.09952207590317,179.7360693554451L494.3715012979541,189.18235100376174L501.6343172586841,180.8130398697031L508.8973576812133,180.71550211455445L516.1603984073215,180.78111274328825L523.423889732866,179.96287157840217L530.7325233211791,180.8210840914861L537.9965344990934,180.83150203995402L545.2687297114484,185.64823054930113L552.5319455226416,180.42037706498135L559.7962266069005,179.65925840536792L567.0605781030262,179.09868362895955L574.3255542026858,180.7244224648546L581.6212860425093,181.20204946909132L588.8843186724937,180.1604491320072L596.1475186627085,177.00935681162613L603.419717856461,188.95507109257522L610.6825525898599,180.344511706909L617.9462204671044,179.69896168836308L625.209746207841,190.11071908847913L632.5186093264919,183.16572090766036L639.7824454849596,185.47827903873593L647.0457598916377,178.64182343551803L654.3191152537,180.1278412833868L661.5833220493062,180.78017403767942L668.8464018058278,181.057230277026L676.1180363775129,185.9796776817534L683.403462364661,181.18081162911156L690.6751037135422,185.52169275893465L697.9377464804022,180.97235744110384L705.2011601348496,181.2542011962183L712.4643372848471,184.26524882512544L719.7277611953417,181.37032544880526L727,181.28634097297572" fill="none" stroke="#73c03a" stroke-width="2"></path><path class="path" d="M0,259.11904016945346L7.295224901868307,258.9395061526578L14.558551964508665,258.9911612686548L21.831027981283942,258.9414473210109L29.094698438949823,258.9380297030062L36.35776433750036,258.9907911051954L43.63017471147077,258.9342558498326L50.892573148516924,259.12539459056813L58.18893217639836,258.93791452418486L65.45197770028541,258.9405248585211L72.71548496988095,258.9399848719208L79.97889671670352,258.9857822773756L87.25041895185188,258.89678773755566L94.50619726628449,258.93971728075536L101.76956167734654,259.1287546363611L109.06652054040794,258.9882457715091L116.33847956214815,258.93596368202725L123.60118003978609,258.93989202761674L130.86457536257458,258.94030522774915L138.12804377816067,258.93493920407377L145.3905630683653,258.98817633830515L152.6625097787464,258.9351710051982L159.92507006442315,259.05440317651284L167.20877867440652,258.9873142504267L174.48057252865928,258.93844041141466L181.74371107489497,258.9410961987787L189.00731941578502,258.9361183708375L196.27004725245462,258.98527647938096L203.54147981487938,258.9352218892081L210.804049099212,259.0547172032511L218.08781357183355,258.93675992780567L225.3506548793588,258.9879511518521L232.62256166089668,258.9408219593847L239.88612148863203,258.9375177165244L247.14909682628527,258.93368227589457L254.41139383102404,258.98832932394174L261.68336766659894,259.13830187884207L268.98203144983,258.93914415119184L276.24529447781373,258.93869936166413L283.5084788275565,258.9342862551285L290.7708826428738,258.98511512413876L298.04228659913156,258.9374340055688L305.30524713115494,258.93995296737756L312.56865323304913,259.19477904531453L319.8774188556635,258.9390763025647L327.1406698820207,258.9381661365425L334.4037599130504,258.93607094278843L341.66647936027334,258.94038124282827L348.92996122358863,258.9925053958158L356.20267561551674,258.70571332367996L363.4661501744751,250.0344041018741L370.76516796979183,258.99094790395367L378.0376061479064,258.9435847574645L385.30165476039315,258.942118570248L392.5654439728302,209.30563719477215L399.8374192114324,249.08670878220042L407.1009918161514,258.94324582859565L414.3649804615298,259.1158305620214L421.65963265341196,258.9410729525242L428.9232368816271,258.9894511837363L436.195409647597,258.9453545365824L443.45977139771867,258.94408098397093L450.7239078060724,258.9903136669391L457.99623351432143,258.94130419808926L465.2598786539091,259.2132787628587L472.57195932842285,258.94302530300536L479.83590895774626,258.9411231896897L487.09952207590317,258.98835969773825L494.3715012979541,258.93661662627443L501.6343172586841,258.93788568073865L508.8973576812133,258.93788738313543L516.1603984073215,258.940434740156L523.423889732866,251.96555785406923L530.7325233211791,258.9433731828685L537.9965344990934,258.98957776634614L545.2687297114484,258.938877229994L552.5319455226416,258.9448986496141L559.7962266069005,258.945296578818L567.0605781030262,258.94882625824374L574.3255542026858,259.12188074919294L581.6212860425093,258.9378416129332L588.8843186724937,258.9387877853251L596.1475186627085,258.9896002299473L603.419717856461,258.93672276484335L610.6825525898599,258.941432731564L617.9462204671044,258.9406292747181L625.209746207841,259.1953233503912L632.5186093264919,258.9423839417996L639.7824454849596,258.93943460887317L647.0457598916377,258.9961192137989L654.3191152537,258.94447878315253L661.5833220493062,258.93810806120155L668.8464018058278,258.98641587815763L676.1180363775129,259.0640551810557L683.403462364661,258.9864541158261L690.6751037135422,258.9356373723751L697.9377464804022,258.9399956688739L705.2011601348496,258.9386586516328L712.4643372848471,258.9400536416061L719.7277611953417,258.98982360316467L727,259.11978618345677" fill="none" stroke="#65b9ac" stroke-width="2"></path><path class="path" d="M0,299.9832570276973L7.295224901868307,299.984389269502L14.558551964508665,299.984465266048L21.831027981283942,299.9844778728148L29.094698438949823,299.9845008660116L36.35776433750036,299.98450297146616L43.63017471147077,299.9832007080523L50.892573148516924,299.98450829098067L58.18893217639836,299.98441975424777L65.45197770028541,299.98447294888047L72.71548496988095,299.9841311253533L79.97889671670352,299.9845572095596L87.25041895185188,299.9844515943031L94.50619726628449,299.98306814718774L101.76956167734654,299.98472372978296L109.06652054040794,299.9832935689739L116.33847956214815,299.9843561273985L123.60118003978609,299.98024527816693L130.86457536257458,299.9844319234436L138.12804377816067,299.9846411979473L145.3905630683653,299.98412455741385L152.6625097787464,299.9845085865819L159.92507006442315,299.98458421677077L167.20877867440652,299.98329471284046L174.48057252865928,299.98347600719035L181.74371107489497,299.9844466526178L189.00731941578502,299.9847676464231L196.27004725245462,299.9768282046149L203.54147981487938,299.98339997409647L210.804049099212,299.9845467823264L218.08781357183355,299.984728111723L225.3506548793588,299.9829619544265L232.62256166089668,299.9841967916199L239.88612148863203,299.9818025157085L247.14909682628527,299.98466161299774L254.41139383102404,299.98463105217843L261.68336766659894,299.98459303834954L268.98203144983,299.9842645415049L276.24529447781373,299.9844392921921L283.5084788275565,299.9846634812142L290.7708826428738,299.98453633373333L298.04228659913156,299.9846633662443L305.30524713115494,299.9846119848308L312.56865323304913,299.9841132450326L319.8774188556635,299.9842299070109L327.1406698820207,299.98461342693423L334.4037599130504,299.98413747350725L341.66647936027334,299.9839006407985L348.92996122358863,299.98453677677037L356.20267561551674,299.6236292070677L363.4661501744751,298.5323247118761L370.76516796979183,299.9814908572582L378.0376061479064,299.95632090095177L385.30165476039315,299.983790583028L392.5654439728302,295.4203054237674L399.8374192114324,299.20139100684685L407.1009918161514,299.9843661745366L414.3649804615298,299.98153904532006L421.65963265341196,299.98330989808886L428.9232368816271,299.98375630747887L436.195409647597,299.98425495696983L443.45977139771867,299.9844414489297L450.7239078060724,299.984666243939L457.99623351432143,299.984499755782L465.2598786539091,299.98354547131805L472.57195932842285,299.9832654117248L479.83590895774626,299.98402340447774L487.09952207590317,299.9842488350733L494.3715012979541,299.98451511545375L501.6343172586841,299.9843992122465L508.8973576812133,299.98422029940264L516.1603984073215,299.98359529592216L523.423889732866,299.4416781906701L530.7325233211791,299.9842578335365L537.9965344990934,299.98160799735456L545.2687297114484,299.9815161596088L552.5319455226416,299.98432516230446L559.7962266069005,299.9837486715994L567.0605781030262,299.9791904562959L574.3255542026858,299.984140457677L581.6212860425093,299.9841807448212L588.8843186724937,299.9842580697789L596.1475186627085,299.98271774884665L603.419717856461,299.98271634928807L610.6825525898599,299.9840442888289L617.9462204671044,299.98270544111307L625.209746207841,299.984579446355L632.5186093264919,299.9842539350118L639.7824454849596,299.9840531322452L647.0457598916377,299.9813021132075L654.3191152537,299.9837223069479L661.5833220493062,299.98465047819485L668.8464018058278,299.9845626041182L676.1180363775129,299.98451054023957L683.403462364661,299.98445375684184L690.6751037135422,299.98442733775084L697.9377464804022,299.9841323026691L705.2011601348496,299.98427655653467L712.4643372848471,299.98055213237853L719.7277611953417,299.98400685140876L727,299.98435537577365" fill="none" stroke="#4682b4" stroke-width="2"></path><path class="stroke"></path><path class="stroke"></path><path class="stroke"></path><path class="stroke"></path><g class="y_grid"><g class="tick" transform="translate(0,300)" data-y-value="0" style="opacity: 1;"><line x2="727" y2="0"></line><text dy=".32em" x="-3" y="0" style="text-anchor: end;">0</text></g><g class="tick" transform="translate(0,200.95745052951006)" data-y-value="1 ms" style="opacity: 1;"><line x2="727" y2="0"></line><text dy=".32em" x="-3" y="0" style="text-anchor: end;">1 ms</text></g><g class="tick" transform="translate(0,101.91490105902012)" data-y-value="2 ms" style="opacity: 1;"><line x2="727" y2="0"></line><text dy=".32em" x="-3" y="0" style="text-anchor: end;">2 ms</text></g><g class="tick" transform="translate(0,2.8723515885301865)" data-y-value="3 ms" style="opacity: 1;"><line x2="727" y2="0"></line><text dy=".32em" x="-3" y="0" style="text-anchor: end;">3 ms</text></g><path class="domain" d="M727,0H0V300H727"></path></g><g class="y_grid"><g class="tick" transform="translate(0,300)" data-y-value="" style="opacity: 1;"><line x2="727" y2="0"></line><text dy=".32em" x="730" y="0" style="text-anchor: start;"></text></g><g class="tick" transform="translate(0,200.95745052951006)" data-y-value="1" style="opacity: 1;"><line x2="727" y2="0"></line><text dy=".32em" x="730" y="0" style="text-anchor: start;">1</text></g><g class="tick" transform="translate(0,101.91490105902012)" data-y-value="2" style="opacity: 1;"><line x2="727" y2="0"></line><text dy=".32em" x="730" y="0" style="text-anchor: start;">2</text></g><g class="tick" transform="translate(0,2.8723515885301865)" data-y-value="3" style="opacity: 1;"><line x2="727" y2="0"></line><text dy=".32em" x="730" y="0" style="text-anchor: start;">3</text></g><path class="domain" d="M727,0H0V300H727"></path></g></svg><div class="detail inactive" style="left: 559.796px;"><div class="x_label right">Monday, March 8 2021 6:17 PM</div><div class="item active right" style="top: 179.659px;"><span class="detail_swatch" style="background-color: #73c03a"></span>Runtime per sec: 1 ms 215 µs<br><span class="date">Mar 8 2021 6:17 PM</span></div><div class="dot active" style="top: 179.659px; border-color: rgb(115, 192, 58);"></div></div><div class="x_tick plain" style="left: 23.9883px;"><div class="title">01:00</div></div><div class="x_tick plain" style="left: 209.822px;"><div class="title">07:00</div></div><div class="x_tick plain" style="left: 395.655px;"><div class="title">13:00</div></div><div class="x_tick plain" style="left: 581.488px;"><div class="title">19:00</div></div></div>        </div>        <div class="graph_timeline rickshaw_annotation_timeline"></div>        <div class="row">        <div class="graph_preview" style="position: relative;"><div class="rickshaw_range_slider_preview_container" style="transform: translate(10px, 3px);"><div class="rickshaw_graph"><svg width="707" height="54"><path class="path" d="M0,1.2384730096541539L12.154182291756891,1.715881963300942L24.308879157338282,1.3318829165704835L36.665959309770905,1.6913554192142866L48.821208127187454,2.2802836820522874L60.97586034145972,2.481292694509416L73.12976547719431,2.495123763364937L85.28318527680089,2.2791580299208176L97.43744699683043,0.5346534653465351L109.59110927183085,2.6316559034733586L121.9476734054128,1.2230990638202974L134.10098376836962,1.183486217367716L146.2568429166792,1.3191162694529195L158.41332106603892,0.9109972232578787L170.56742498920903,1.2715797146869878L182.72239665060326,1.649554635202491L195.079245839684,2.4060683709516413L207.2346920476774,1.7122892747200245L219.38969439179434,1.724563226905288L231.5434734249105,15.940989218542107L243.6975165606458,17.306380393768638L255.84799645447882,2.1242651567013815L268.19890359955156,1.3279527458485432L280.3572961677687,2.5655656668506697L292.51155764696057,2.507806395156275L304.6645015512769,2.4600035582009188L316.82112295089905,2.3869216043261656L328.9746690457942,1.516640103591731L341.33463597520426,2.6197806644857247L353.4895706439282,2.3286845888869663L365.6432399995569,2.1813530244096726L377.799433286088,1.280928109988583L389.9540037118782,2.3360522358958606L402.1121405104607,1.9591780474292981L414.4675896618382,2.5620541442982785L426.6214054949546,2.1682560147483834L438.7783194160442,2.305547844966041L450.9317710062268,1.0126042422635615L463.0913951702616,2.634216210161914L475.2454746243217,1.7534756130161484L487.6004514448068,2.325449319242522L499.75729908736207,2.0613824241556475L511.91059471105183,1.0543153158349128L524.0676385399954,1.0227970549935312L536.2224107877762,2.25194373208761L548.3757318439267,2.891168214387972L560.7349037680973,2.946657669009789L572.8879494504246,2.68486272631107L585.0450389421957,2.5354386293319164L597.1980272569833,2.315790496037568L609.3551000346182,3.016806234244914L621.5117749483768,2.5001731782823793L633.8669087468733,2.707452664835044L646.0236976250303,2.8962126448578918L658.1780635796152,2.6823259143930978L670.3309569080151,2.3915480997798326L682.4872051537088,2.160882671796398L694.640619751221,1.6962902046033839L707,2.1934625064042113" fill="none" stroke="#cb513a" stroke-width="2"></path><path class="path" d="M0,32.07467773437348L12.154182291756891,32.27398727452121L24.308879157338282,32.47286150155016L36.665959309770905,32.26478257014868L48.821208127187454,32.508438418747396L60.97586034145972,32.5906495534299L73.12976547719431,32.5955426305691L85.28318527680089,32.50728011644145L97.43744699683043,31.781251283225313L109.59110927183085,33.0032434161431L121.9476734054128,32.06671548729273L134.10098376836962,32.05485533819913L146.2568429166792,32.11232391994562L158.41332106603892,31.938451213140308L170.56742498920903,32.08985830419705L182.72239665060326,32.60230419676836L195.079245839684,32.56210725023382L207.2346920476774,32.27304041324934L219.38969439179434,32.27595425046252L231.5434734249105,38.1842023728627L243.6975165606458,38.74713248345954L255.84799645447882,32.78613595363381L268.19890359955156,32.11944106930391L280.3572961677687,32.62629714136625L292.51155764696057,32.599975175181925L304.6645015512769,32.58658823925859L316.82112295089905,32.550798696480896L328.9746690457942,32.55338789974928L341.33463597520426,32.65000877950679L353.4895706439282,32.52681447991048L365.6432399995569,32.470058633273915L377.799433286088,32.093019685724954L389.9540037118782,32.53776541051644L402.1121405104607,32.7264491725297L414.4675896618382,32.62405409918511L426.6214054949546,32.46589358048481L438.7783194160442,32.51681451412081L450.9317710062268,31.99067117565796L463.0913951702616,32.654505358720726L475.2454746243217,32.64154440492085L487.6004514448068,32.53108435990023L499.75729908736207,32.41506722275363L511.91059471105183,32.00332889141689L524.0676385399954,31.986120972906896L536.2224107877762,32.494306770828175L548.3757318439267,33.11372674898767L560.7349037680973,32.782538418841206L572.8879494504246,32.68083178223394L585.0450389421957,32.611537284612794L597.1980272569833,32.52746898915174L609.3551000346182,32.81801729877293L621.5117749483768,32.94706295099626L633.8669087468733,32.68968994205107L646.0236976250303,32.76388078331898L658.1780635796152,32.67241640704176L670.3309569080151,32.55748875216174L682.4872051537088,32.456629011364356L694.640619751221,32.62578489893001L707,32.46968720270378" fill="none" stroke="#73c03a" stroke-width="2"></path><path class="path" d="M0,46.60324924017599L12.154182291756891,46.60356238134203L24.308879157338282,46.72470063843778L36.665959309770905,46.603898237880365L48.821208127187454,46.603535211525724L60.97586034145972,46.60308054851223L73.12976547719431,46.60278519661949L85.28318527680089,46.60329755932968L97.43744699683043,46.60293275255326L109.59110927183085,46.72439683799684L121.9476734054128,46.60271854859281L134.10098376836962,46.60426958692496L146.2568429166792,46.604646183551544L158.41332106603892,46.6032015351505L170.56742498920903,46.60372957581797L182.72239665060326,46.72456468076615L195.079245839684,46.60401833729843L207.2346920476774,46.6037482617898L219.38969439179434,46.60300382322745L231.5434734249105,46.60316452644656L243.6975165606458,46.600995366339376L255.84799645447882,46.72106443086347L268.19890359955156,46.605810637219086L280.3572961677687,46.60329743638098L292.51155764696057,46.60249547801061L304.6645015512769,46.604733321366865L316.82112295089905,46.6028620494029L328.9746690457942,46.72639985903046L341.33463597520426,46.603707078766114L353.4895706439282,46.60293705617964L365.6432399995569,46.60447288503751L377.799433286088,46.60348542016779L389.9540037118782,46.60565508664636L402.1121405104607,46.72374026166044L414.4675896618382,46.60302620159993L426.6214054949546,46.60491127769081L438.7783194160442,46.60280450218888L450.9317710062268,46.60655954741269L463.0913951702616,46.60318665794193L475.2454746243217,46.72346208215362L487.6004514448068,46.60487096789258L499.75729908736207,46.6027095719218L511.91059471105183,46.604990298367696L524.0676385399954,46.60360823763808L536.2224107877762,46.602725065888244L548.3757318439267,46.725931995545146L560.7349037680973,46.60255745707443L572.8879494504246,46.60501807195257L585.0450389421957,46.6025225324916L597.1980272569833,46.60500787194343L609.3551000346182,46.6047658899808L621.5117749483768,46.72355453339141L633.8669087468733,46.60483520486834L646.0236976250303,46.60336100031336L658.1780635796152,46.602464734042016L670.3309569080151,46.604506316305105L682.4872051537088,46.602781999509105L694.640619751221,46.72605458516423L707,46.60261660676005" fill="none" stroke="#65b9ac" stroke-width="2"></path><path class="path" d="M0,53.99708005867006L12.154182291756891,53.99711775618877L24.308879157338282,53.99688238871758L36.665959309770905,53.99716403874033L48.821208127187454,53.99729200631162L60.97586034145972,53.99725544700672L73.12976547719431,53.99728492627859L85.28318527680089,53.997248130823955L97.43744699683043,53.99702874602805L109.59110927183085,53.997361866293474L121.9476734054128,53.997016528445016L134.10098376836962,53.996785223904055L146.2568429166792,53.997211655797024L158.41332106603892,53.997334193833275L170.56742498920903,53.997128176119716L182.72239665060326,53.99724231899658L195.079245839684,53.997237748768626L207.2346920476774,53.99725480720485L219.38969439179434,53.997045935606835L231.5434734249105,53.99707026140563L243.6975165606458,53.99722389346146L255.84799645447882,53.9972441949936L268.19890359955156,53.99708077403951L280.3572961677687,53.99719487451976L292.51155764696057,53.99716350086615L304.6645015512769,53.99714453962999L316.82112295089905,53.99724856056795L328.9746690457942,53.99709259655158L341.33463597520426,53.99723585740949L353.4895706439282,53.99716662901002L365.6432399995569,53.99721898598365L377.799433286088,53.997231928383705L389.9540037118782,53.99729189511888L402.1121405104607,53.997367449226694L414.4675896618382,53.99738235891227L426.6214054949546,53.997316174400844L438.7783194160442,53.99732251111768L450.9317710062268,53.99714465329712L463.0913951702616,53.99730696819843L475.2454746243217,53.99716680719635L487.6004514448068,53.99718156842324L499.75729908736207,53.9971860707212L511.91059471105183,53.99718279710402L524.0676385399954,53.99725830550155L536.2224107877762,53.99719347389005L548.3757318439267,53.997233235493766L560.7349037680973,53.997273894474134L572.8879494504246,53.997237530550905L585.0450389421957,53.99725494406135L597.1980272569833,53.99716505581785L609.3551000346182,53.997207263790614L621.5117749483768,53.997399398390314L633.8669087468733,53.99719752834915L646.0236976250303,53.99726442703237L658.1780635796152,53.997218526740056L670.3309569080151,53.997355075638914L682.4872051537088,53.99734291929424L694.640619751221,53.997114571332816L707,53.99717449543912" fill="none" stroke="#4682b4" stroke-width="2"></path><path class="stroke"></path><path class="stroke"></path><path class="stroke"></path><path class="stroke"></path></svg><div class="x_tick plain" style="left: 180.908px;"><div class="title">16:45</div></div><div class="x_tick plain" style="left: 362.734px;"><div class="title">17:00</div></div><div class="x_tick plain" style="left: 544.56px;"><div class="title">17:15</div></div></div></div><svg class="rickshaw_range_slider_preview" style="height: 60px; width: 727px; position: absolute; top: 0px;"><path fill="white" fill-opacity="0.7" fill-rule="evenodd" class="dimming" d=" M 10 3 h 707 v 54 h -707 z  M 10 3 H 717 v 54 H 10 z"></path><path stroke="white" stroke-width="1px" stroke-linejoin="round" fill="#d4d4d4" fill-opacity="1" fill-rule="evenodd" class="frame" d=" M 0 0 H 727 V 60 H 0 z M 10 3 H 717 v 54 H 10 z"></path><path stroke="#949494" class="gripper" d=" M 4 18 V 42 M 721 18 V 42 M 6 18 V 42 M 723 18 V 42"></path><rect width="10" class="left_handle" x="0" height="60" style="cursor: ew-resize; fill-opacity: 0;"></rect><rect width="10" class="right_handle" x="717" height="60" style="cursor: ew-resize; fill-opacity: 0;"></rect><rect class="middle_handle" width="707" x="10" height="60" style="cursor: move; fill-opacity: 0;"></rect></svg></div>        </div>    </div>

Network console: URL: http://172.25.0.239:8888/server/1/config_changes/?from=2021-03-08+00%3A00%3A00%2B0100&to=2021-03-09+00%3A00%3A00%2B0100

Request headers:

GET /server/1/config_changes/?from=2021-03-08+00%3A00%3A00%2B0100&to=2021-03-09+00%3A00%3A00%2B0100 HTTP/1.1
Host: 172.25.0.239:8888
Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36
X-Requested-With: XMLHttpRequest
Referer: http://172.25.0.239:8888/server/1/overview/?from=2021-03-08T00%3A00%3A00%2B01%3A00&to=2021-03-09T00%3A00%3A00%2B01%3A00
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,cs-CZ;q=0.8,cs;q=0.7
Cookie: username="2|1:0|10:1613950450|8:username|12:emVsZW55YQ==|1f8999cbf26d632b56698826b3b20d09b5f1bad7a3eeeaf27a0af31a12e6ed50"; password=2|1:0|10:1613950450|8:password|12:Njg3IDMzIDYx|0fb5b46b98e2f541bd0b9827cfb3fc242ec2c68e6b9980f54cbabe9c52423b86; server="2|1:0|10:1613950450|6:server|8:bWFpbg==|b18fe8df4d796549fbdd49966dca52f283c0c259bc8fd56c0b84accb88171ab6"; _flashes="2|1:0|10:1615394247|8:_flashes|8:gANOLg==|34c201ceedcde801e36331e45ba575bf9b9d7cba6a8e0eeef6373e0f84a00af3"
If-None-Match: "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"

Response:

{}

I hope I grab it properly.

Ales

rjuju commented 3 years ago

Thanks!

I think that the warning are more or less expected. Those will eventually be fixed when we'll update the js dependencies.

The reason for the empty timeline is there:

Response:

{}

So no configuration changes were found on that server in the interval you're currently displaying, which is 2021-03-08 00:00:00+0100 - 2021-03-09 00:00:00+0100.

Do you still have any records in pg_track_settings_history for that server id (1)?

You previously had (and you need both of those):

 powa=#    SELECT * FROM pg_track_settings_history WHERE srvid = 1 AND name = 'random_page_cost';
 srvid |              ts               |       name       | setting | is_dropped | setting_pretty 
-------+-------------------------------+------------------+---------+------------+----------------
     1 | 2021-02-18 00:36:23.352788+01 | random_page_cost | 4       | f          | 4
     1 | 2021-03-08 11:58:38.743238+01 | random_page_cost | 1       | f          | 1
(2 rows)

Can you validate manually the query that the UI will execute for the page you viewed, on the repository server?

SELECT * FROM
(
  WITH src AS (
    select ts, name,
    lag(setting_pretty) OVER (PARTITION BY name ORDER BY ts) AS prev_val,
    setting_pretty AS new_val,
    lag(is_dropped) OVER (PARTITION BY name ORDER BY ts) AS prev_is_dropped,
    is_dropped as is_dropped
    FROM public.pg_track_settings_history h
    WHERE srvid = 1
    AND ts <= '2021-03-09 00:00:00+0100'
  )
  SELECT extract("epoch" FROM ts) AS ts, 'global' AS kind,
  json_build_object(
    'name', name,
    'prev_val', prev_val,
    'new_val', new_val,
    'prev_is_dropped', coalesce(prev_is_dropped, true),
    'is_dropped', is_dropped
  ) AS data
  FROM src
  WHERE ts >= '2021-03-08 00:00:00+0100' AND ts <= '2021-03-09 00:00:00+0100'
) AS global

UNION ALL

SELECT * FROM
(
  WITH src AS (
    select ts, name,
    lag(setting) OVER (PARTITION BY name, setdatabase, setrole ORDER BY ts) AS prev_val,
    setting AS new_val,
    lag(is_dropped) OVER (PARTITION BY name, setdatabase, setrole ORDER BY ts) AS prev_is_dropped,
    is_dropped as is_dropped,
    d.datname,
    h.setrole
    FROM public.pg_track_db_role_settings_history h
    LEFT JOIN public.powa_databases d
      ON d.srvid = h.srvid
      AND d.oid = h.setdatabase
    WHERE h.srvid = 1

    AND ts <= '2021-03-09 00:00:00+0100'
  )
  SELECT extract("epoch" FROM ts) AS ts, 'rds' AS kind,
  json_build_object(
    'name', name,
    'prev_val', prev_val,
    'new_val', new_val,
    'prev_is_dropped', coalesce(prev_is_dropped, true),
    'is_dropped', is_dropped,
    'datname', datname,
    'setrole', setrole
  ) AS data
  FROM src
  WHERE ts >= '2021-03-08 00:00:00+0100' AND ts <= '2021-03-09 00:00:00+0100'
) AS rds

UNION ALL

SELECT extract("epoch" FROM ts) AS ts, 'reboot' AS kind,
NULL AS data
FROM public.pg_reboot AS r
WHERE r.srvid = 1
AND r.ts>= '2021-03-08 00:00:00+0100'
AND r.ts <= '2021-03-09 00:00:00+0100'
ORDER BY ts;

Note that the UI relies on pg_track_settings never being purged, as you can only know that a parameter changed if you know the previous entry for the parameter. So if there aren't anymore the settings from 2021-02-18, the UI won't be able to display anything.

If that query returns nothing, can you also try to execute this query?

    select ts, name,
    lag(setting_pretty) OVER (PARTITION BY name ORDER BY ts) AS prev_val,
    setting_pretty AS new_val,
    lag(is_dropped) OVER (PARTITION BY name ORDER BY ts) AS prev_is_dropped,
    is_dropped as is_dropped
    FROM public.pg_track_settings_history h
    WHERE srvid = 1
    AND ts <= '2021-03-09 00:00:00+0100'
aleszeleny commented 3 years ago

Hello, here are the queries:

powa=> 
powa=> SELECT * FROM pg_track_settings_history WHERE srvid = 1 AND name = 'random_page_cost';
 srvid |              ts               |       name       | setting | is_dropped | setting_pretty 
-------+-------------------------------+------------------+---------+------------+----------------
     1 | 2021-02-18 00:36:23.352788+01 | random_page_cost | 4       | f          | 4
     1 | 2021-03-08 11:58:38.743238+01 | random_page_cost | 1       | f          | 1
(2 rows)

powa=> SELECT * FROM
powa-> (
powa(>   WITH src AS (
powa(>     select ts, name,
powa(>     lag(setting_pretty) OVER (PARTITION BY name ORDER BY ts) AS prev_val,
powa(>     setting_pretty AS new_val,
powa(>     lag(is_dropped) OVER (PARTITION BY name ORDER BY ts) AS prev_is_dropped,
powa(>     is_dropped as is_dropped
powa(>     FROM public.pg_track_settings_history h
powa(>     WHERE srvid = 1
powa(>     AND ts <= '2021-03-09 00:00:00+0100'
powa(>   )
powa(>   SELECT extract("epoch" FROM ts) AS ts, 'global' AS kind,
powa(>   json_build_object(
powa(>     'name', name,
powa(>     'prev_val', prev_val,
powa(>     'new_val', new_val,
powa(>     'prev_is_dropped', coalesce(prev_is_dropped, true),
powa(>     'is_dropped', is_dropped
powa(>   ) AS data
powa(>   FROM src
powa(>   WHERE ts >= '2021-03-08 00:00:00+0100' AND ts <= '2021-03-09 00:00:00+0100'
powa(> ) AS global
powa-> 
powa-> UNION ALL
powa-> 
powa-> SELECT * FROM
powa-> (
powa(>   WITH src AS (
powa(>     select ts, name,
powa(>     lag(setting) OVER (PARTITION BY name, setdatabase, setrole ORDER BY ts) AS prev_val,
powa(>     setting AS new_val,
powa(>     lag(is_dropped) OVER (PARTITION BY name, setdatabase, setrole ORDER BY ts) AS prev_is_dropped,
powa(>     is_dropped as is_dropped,
powa(>     d.datname,
powa(>     h.setrole
powa(>     FROM public.pg_track_db_role_settings_history h
powa(>     LEFT JOIN public.powa_databases d
powa(>       ON d.srvid = h.srvid
powa(>       AND d.oid = h.setdatabase
powa(>     WHERE h.srvid = 1
powa(> 
powa(>     AND ts <= '2021-03-09 00:00:00+0100'
powa(>   )
powa(>   SELECT extract("epoch" FROM ts) AS ts, 'rds' AS kind,
powa(>   json_build_object(
powa(>     'name', name,
powa(>     'prev_val', prev_val,
powa(>     'new_val', new_val,
powa(>     'prev_is_dropped', coalesce(prev_is_dropped, true),
powa(>     'is_dropped', is_dropped,
powa(>     'datname', datname,
powa(>     'setrole', setrole
powa(>   ) AS data
powa(>   FROM src
powa(>   WHERE ts >= '2021-03-08 00:00:00+0100' AND ts <= '2021-03-09 00:00:00+0100'
powa(> ) AS rds
powa-> 
powa-> UNION ALL
powa-> 
powa-> SELECT extract("epoch" FROM ts) AS ts, 'reboot' AS kind,
powa-> NULL AS data
powa-> FROM public.pg_reboot AS r
powa-> WHERE r.srvid = 1
powa-> AND r.ts>= '2021-03-08 00:00:00+0100'
powa-> AND r.ts <= '2021-03-09 00:00:00+0100'
powa-> ORDER BY ts;
        ts         |  kind  |                                                       data                                                        
-------------------+--------+-------------------------------------------------------------------------------------------------------------------
 1615201118.743238 | global | {"name" : "random_page_cost", "prev_val" : "4", "new_val" : "1", "prev_is_dropped" : false, "is_dropped" : false}
(1 row)

Hope it helps.

Ales

rjuju commented 3 years ago

Thanks a lot, that's clearly helpful.

I think I know what the problem is. I'm assuming that you have powa-web version 4.1.0, since you're using the RPM packages. There was a bug around extension version detection that I fixed in version 4.1.1, but unfortunately the packages aren't updated yet (see issue https://github.com/powa-team/powa-web/issues/130). As far as I can see for the timeline bar the outcome is that powa-web will try to get the pg_track_setting extension version for the local server in powa_extensions rather than pg_extension. But those rows won't be updated as they shouldn't be needed.

I think that you can fix the timeline with an update on powa_extensions, as a workaround until the rpm for powa-web 4.1.1 are available:

UPDATE powa_extensions SET version = '2.0.1' WHERE srvid = 0 AND extname = 'pg_track_settings';

Note that until you can have version 4.1.1 you might have other issues when extension version is required (like the index advisor, or maybe the wait event and CPU / disk metrics). If required you can manually fix your local file, but it might later raise some error when trying to update the RPM. If you want to try the local fix, you simply need that change in powa/framework.py, in has_extension_version() function (around line 310):

-        if (srvid != 0 and database is None):
+        if (srvid != "0" and database is None):
aleszeleny commented 3 years ago

Hello,

an excellent analysis, many thanks. Updating the extension version fixed that for me. Since there were no more complaints, I'll wait for fixed packages to get smooth RPM updates, as you mention.

Many thanks for your sustaining effort!

rjuju commented 3 years ago

Ah excellent news! Thanks a lot, and sorry it took so long to track it down.