57.5. Процессы кластеризации #

Вы можете просмотреть информацию о процессах кластеризации — перестроения таблиц по индексу (CLUSTER), а также о процессах полной очистки (VACUUM FULL). Информация основана на представлении pg_stat_progress_cluster.

57.5.1. Просмотр процессов кластеризации #

Перейдите процессам кластеризации одним из следующих способов:

  • Через раздел мониторинга:

    1. В навигационной панели перейдите в Мониторинг → Активность.

    2. Выберите вкладку Кластеризация, затем в правом верхнем углу страницы выберите экземпляр и базу данных.

  • Через раздел настройки экземпляра:

    1. В навигационной панели перейдите в Инфраструктура → Экземпляры.

    2. Нажмите на имя экземпляра.

    3. В навигационной панели перейдите в Активность.

    4. Выберите вкладку Кластеризация, затем в правом верхнем углу станицы выберите базу данных.

Отобразится таблица процессов кластеризации со следующими столбцами:

  • PID: идентификатор обслуживающего процесса.

  • State: состояние обслуживающего процесса.

    За подробной информацией о возможных значениях обратитесь к официальной документации Postgres Pro по модулю pg_stat_activity (обратитесь к столбцу state).

  • Wait event: тип и имя события, которое ожидает обслуживающий процесс.

    За подробной информацией обратитесь к официальной документации Postgres Pro по модулю pg_stat_activity (обратитесь к столбцам wait_event_type и wait_event).

  • Phase: фаза выполнения кластеризации.

    За подробной информацией о возможных значениях обратитесь к официальной документации Postgres Pro.

  • Database: имя базы данных, в которой выполняется кластеризация.

  • User: имя пользователя СУБД, от имени которого выполняется кластеризация.

  • Table: имя или идентификатор таблицы, для которой выполняется кластеризация.

  • Query: текст текущего или последнего запроса обслуживающего процесса.

  • Query duration: длительность текущего или последнего запроса обслуживающего процесса.

  • Blocked totals: количество пользовательских сеансов, заблокированных процессом кластеризации.

  • Heap scanned, %: процент отсканированных данных таблицы, для которой выполняется кластеризация.

  • Heap total: общий размер таблицы, для которой выполняется кластеризация.

  • Scanned: размер отсканированных данных таблицы, для которой выполняется кластеризация.

  • Tuples scanned: количество отсканированных строк таблицы, для которой выполняется кластеризация.

  • Tuples written: количество записанных строк таблицы, для которой выполняется кластеризация.

  • Действия.

    За подробной информацией о доступных действиях обратитесь к соответствующим инструкциям.

57.5.2. Отмена процесса кластеризации #

При отмене процесса кластеризации пользовательский сеанс не завершается.

Чтобы отменить процесс кластеризации:

  1. Перейдите процессам кластеризации одним из следующих способов:

    • Через раздел мониторинга:

      1. В навигационной панели перейдите в Мониторинг → Активность.

      2. Выберите вкладку Кластеризация, затем в правом верхнем углу страницы выберите экземпляр и базу данных.

    • Через раздел настройки экземпляра:

      1. В навигационной панели перейдите в Инфраструктура → Экземпляры.

      2. Нажмите на имя экземпляра.

      3. В навигационной панели перейдите в Активность.

      4. Выберите вкладку Кластеризация, затем в правом верхнем углу станицы выберите базу данных.

  2. Нажмите Прервать текущий запрос рядом с процессом кластеризации.

  3. Нажмите Выполнить.

57.5.3. Завершение пользовательского сеанса для процесса кластеризации #

При завершении пользовательского сеанса автоматически отменяется процесс кластеризации.

Чтобы завершить пользовательский сеанс для процесса кластеризации:

  1. Перейдите процессам кластеризации одним из следующих способов:

    • Через раздел мониторинга:

      1. В навигационной панели перейдите в Мониторинг → Активность.

      2. Выберите вкладку Кластеризация, затем в правом верхнем углу страницы выберите экземпляр и базу данных.

    • Через раздел настройки экземпляра:

      1. В навигационной панели перейдите в Инфраструктура → Экземпляры.

      2. Нажмите на имя экземпляра.

      3. В навигационной панели перейдите в Активность.

      4. Выберите вкладку Кластеризация, затем в правом верхнем углу станицы выберите базу данных.

  2. Нажмите рядом с процессом кластеризации.

  3. Нажмите Выполнить.

57.5. Clustering Processes #

You can view information about clustering processes — reindexing tables (CLUSTER) and about full vacuum processes (VACUUM FULL). The information is based on the pg_stat_progress_cluster view.

57.5.1. Viewing Clustering Processes #

Go to clustering processes in one of the following ways:

  • Using the monitoring section:

    1. In the navigation panel, go to Monitoring → Activity.

    2. Select Cluster, and then in the top-right corner of the page, select the instance and database.

  • Using the configuration section of an instance:

    1. In the navigation panel, go to Infrastructure → Instances.

    2. Click the name of the instance.

    3. In the navigation panel, go to Activity.

    4. Select Cluster, and then in the top-right corner of the page, select the database.

The table of clustering processes with the following columns will be displayed:

  • PID: The ID of the backend.

  • State: The state of the backend.

    For more information about possible values, refer to the official Postgres Pro documentation on the pg_stat_activity module (refer to the state column).

  • Wait event: The name and type of the wait event for the backend.

    For more information, refer to the official Postgres Pro documentation on the pg_stat_activity module (refer to wait_event_type and wait_event columns).

  • Phase: The clustering phase.

    For more information about possible values, refer to the official Postgres Pro documentation.

  • Database: The name of the database where clustering is being performed.

  • User: The name of the DBMS user on behalf of which clustering is being performed.

  • Table: The name or ID of the table for which clustering is being performed.

  • Query: The text of the current or last backend query.

  • Query duration: The duration of the current or last backend query.

  • Blocked totals: The number of user sessions blocked by the clustering process.

  • Heap scanned, %: The percentage of data scanned in the table for which clustering is being performed.

  • Heap total: The total size of the table for which clustering is being performed.

  • Scanned: The size of data scanned in the table for which clustering is being performed.

  • Tuples scanned: The number of rows scanned in the table for which clustering is being performed.

  • Tuples written: The number of rows written to the table for which clustering is being performed.

  • Actions.

    For more information about available actions, refer to the corresponding instructions.

57.5.2. Canceling a Clustering Process #

Canceling a clustering process does not terminate a user session.

To cancel a clustering process:

  1. Go to clustering processes in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to Monitoring → Activity.

      2. Select Cluster, and then in the top-right corner of the page, select the instance and database.

    • Using the configuration section of an instance:

      1. In the navigation panel, go to Infrastructure → Instances.

      2. Click the name of the instance.

      3. In the navigation panel, go to Activity.

      4. Select Cluster, and then in the top-right corner of the page, select the database.

  2. Click Cancel current request next to the clustering process.

  3. Click Execute.

57.5.3. Terminating the User Session for a Clustering Process #

When the user session is terminated, the clustering process is canceled automatically.

To terminate the user session for a clustering process:

  1. Go to clustering processes in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to Monitoring → Activity.

      2. Select Cluster, and then in the top-right corner of the page, select the instance and database.

    • Using the configuration section of an instance:

      1. In the navigation panel, go to Infrastructure → Instances.

      2. Click the name of the instance.

      3. In the navigation panel, go to Activity.

      4. Select Cluster, and then in the top-right corner of the page, select the database.

  2. Click next to the clustering process.

  3. Click Execute.

FAQ