mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 14:15:49 -06:00
Highlighting the "autovacuum launcher" process in the presence of inactive replication slots.
Добавлена подсветка процесса "autovacuum launcher" если нет активных слотов репликации. Цвет подсветки как для заблокированного процесса.
This commit is contained in:
parent
d64fe4d6c2
commit
9e792fb0f1
1 changed files with 21 additions and 3 deletions
|
|
@ -1922,7 +1922,8 @@ void frmStatus::OnRefreshStatusTimer(wxTimerEvent &event)
|
|||
// Clear the queries array content
|
||||
queries.Clear();
|
||||
wxString blocked=wxT("");
|
||||
|
||||
int countsenders=0;
|
||||
long pidAV=-1;
|
||||
wxArrayLong pids;
|
||||
wxDateTime tt;
|
||||
while (!dataSet1->Eof())
|
||||
|
|
@ -2024,15 +2025,21 @@ void frmStatus::OnRefreshStatusTimer(wxTimerEvent &event)
|
|||
{
|
||||
backend_xid= dataSet1->GetVal(wxT("backend_xid"));
|
||||
statusList->SetItem(row, colpos++, backend_xid);
|
||||
if (!slinfo.IsEmpty()) statusList->SetItem(row, colpos++, dataSet1->GetVal(wxT("xmin_slot")));
|
||||
if (!slinfo.IsEmpty()) {
|
||||
statusList->SetItem(row, colpos++, dataSet1->GetVal(wxT("xmin_slot")));
|
||||
countsenders++;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxString av_replica;
|
||||
if (iswalsend) av_replica= dataSet1->GetVal(wxT("av_replica"));
|
||||
if (av_replica.IsEmpty())
|
||||
statusList->SetItem(row, colpos++, dataSet1->GetVal(wxT("backend_xmin")));
|
||||
else
|
||||
else {
|
||||
statusList->SetItem(row, colpos++, av_replica);
|
||||
pidAV=pid;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (connection->BackendMinimumVersion(9, 6))
|
||||
|
|
@ -2142,6 +2149,17 @@ void frmStatus::OnRefreshStatusTimer(wxTimerEvent &event)
|
|||
delete dataSet1;
|
||||
if (viewMenu->IsChecked(MNU_HIGHLIGHTSTATUS))
|
||||
{
|
||||
if (countsenders == 0 && pidAV>0) {
|
||||
// all walsender active='f'
|
||||
for(long i = 0; i < pids.size(); i++)
|
||||
{
|
||||
if (pids[i]==pidAV)
|
||||
statusList->SetItemBackgroundColour(i,
|
||||
wxColour(settings->GetBlockedProcessColour()));
|
||||
}
|
||||
}
|
||||
|
||||
// who blocking
|
||||
wxString numstr;
|
||||
wxString str;
|
||||
numstr=blocked.BeforeFirst(',',&str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue