Skip to content

Commit

Permalink
Fix toprow sync with the extension versions
Browse files Browse the repository at this point in the history
The toprow in server.py didn't sync at all the list of columns depending on
the found extension versions, as diagnosed by Pierre Giraud.  Looking a bit
deeper the sync code in database.py was also wrong as the plan time column
requires pgss 1.8.
  • Loading branch information
rjuju committed Jul 28, 2024
1 parent e5f49c1 commit c8d480c
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 29 deletions.
34 changes: 20 additions & 14 deletions powa/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,21 +987,27 @@ def dashboard(self):

toprow = [{
# query
}, {
# plan time
}, {
'name': 'Execution',
'colspan': 3
}, {
'name': 'Blocks',
'colspan': 4,
}, {
'name': 'Temp blocks',
'colspan': 2
}, {
'name': 'I/O Time',
'colspan': 2
}]

if pgss18:
toprow.extend([{
# plan time
}])

toprow.extend([{
'name': 'Execution',
'colspan': 3
}, {
'name': 'Blocks',
'colspan': 4,
}, {
'name': 'Temp blocks',
'colspan': 2
}, {
'name': 'I/O Time',
'colspan': 2
}])

if pgss18:
toprow.extend([{
'name': 'WALs',
Expand Down
42 changes: 27 additions & 15 deletions powa/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1760,26 +1760,38 @@ def dashboard(self):

toprow = [{
# database
}, {
}]

if pgss18:
toprow.extend([{
# plan time
}, {
'name': 'Execution',
'colspan': 3
}, {
'name': 'Blocks',
'colspan': 4,
}, {
'name': 'Temp blocks',
'colspan': 2
}, {
'name': 'I/O',
}, {
}])

toprow.extend([{
'name': 'Execution',
'colspan': 3
}, {
'name': 'Blocks',
'colspan': 4,
}, {
'name': 'Temp blocks',
'colspan': 2
}, {
'name': 'I/O',
}])

if pgss18:
toprow.extend([{
'name': 'WAL',
'colspan': 3
}, {
}])

if pgss110:
toprow.extend([{
'name': 'JIT',
'colspan': 2
}]
}])

dashes = [graphs,
[Grid("Details for all databases",
toprow=toprow,
Expand Down

0 comments on commit c8d480c

Please sign in to comment.