[EN]
Session manager in the cluster.
Data updating is performed manually.
Controls
Drop-down list "Query type" - type of SQL query used to retrieve data
PostgreSQL version >= 10
PostgreSQL version <10
Version >= 10 - for databases version 10 and older
SELECT datname,
pid,
usename,
application_name,
cast(client_addr as text),
to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start,
to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start,
state,
wait_event_type || ': ' || wait_event AS wait_event,
cast(pg_blocking_pids(pid) as text) AS blocking_pids,
query,
backend_type
FROM pg_stat_activity
ORDER BY pid
Version < 10 - version bases less than 10
SELECT datname,
pid,
usename,
application_name,
cast(client_addr as text),
to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start,
to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start,
state,
'' wait_event,
'---' blocking_pids,
query,
'9.0' backend_type
FROM pg_stat_activity
ORDER BY pid
Control buttons
Update session list
End the current request in the session (select pg_cancel_backend($$PID))
Terminate session (select pg_terminate_backend($$PID))
Save session information to file
Adjust the size of the speakers
When you select a session in the "Session list" the current SQL query in the session is displayed in the "SQL Text" field.
When you switch to the "Query plan" tab, the query execution plan is displayed
[RU]
Менеджер сессий в кластере.
Обновление данных выполняется в ручном режиме.
Элементы управления
Выпадающий список "Query type" - вид SQL запроса используемого для извлечения данных
PostgreSQL version >= 10
PostgreSQL version <10
Version >= 10 - для баз версии 10 и старше
SELECT datname,
pid,
usename,
application_name,
cast(client_addr as text),
to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start,
to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start,
state,
wait_event_type || ': ' || wait_event AS wait_event,
cast(pg_blocking_pids(pid) as text) AS blocking_pids,
query,
backend_type
FROM pg_stat_activity
ORDER BY pid
Version < 10 - баз версий меньше 10
SELECT datname,
pid,
usename,
application_name,
cast(client_addr as text),
to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start,
to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start,
state,
'' wait_event,
'---' blocking_pids,
query,
'9.0' backend_type
FROM pg_stat_activity
ORDER BY pid
Кнопки управления
Обновить список сессий
Завершить текущий запрос в сессии (select pg_cancel_backend($$PID))
Завершить сессию (select pg_terminate_backend($$PID))
Сохранить информацию о сессии в файл
Подогнать размер колонок
При выделении сессии в списке "Session list" в поле "SQL Text" выводится текущий SQL запрос в сессии.
При переключении на вкладку "Query plan" выводится план выполнения запроса