57.8. Процессы копирования #
Вы можете просмотреть информацию о процессах копирования (COPY). Информация основана на представлении pg_stat_progress_copy.
57.8.1. Просмотр процессов копирования #
Перейдите к процессам копирования одним из следующих способов:
Через раздел мониторинга:
В навигационной панели перейдите в Мониторинг → Активность.
Выберите вкладку Копирование, затем в правом верхнем углу страницы выберите экземпляр и базу данных.
Через раздел настройки экземпляра:
В навигационной панели перейдите в Инфраструктура → Экземпляры.
Нажмите на имя экземпляра.
В навигационной панели перейдите в Активность.
Выберите Копирование, затем в правом верхнем углу страницы выберите базу данных.
Отобразится таблица процессов копирования со следующими столбцами:
PID: идентификатор обслуживающего процесса.
State: состояние обслуживающего процесса.
За подробной информацией о возможных значениях обратитесь к официальной документации Postgres Pro по модулю
pg_stat_activity(обратитесь к столбцуstate).Wait event: тип и имя события, которое ожидает обслуживающий процесс.
y76hjuЗа подробной информацией обратитесь к официальной документации Postgres Pro по модулю
pg_stat_activity(обратитесь к столбцамwait_event_typeиwait_event).Database: имя базы данных, в которой выполняется копирование.
User: имя пользователя СУБД, от имени которого выполняется копирование.
Table: имя или идентификатор таблицы, для которой выполняется копирование.
Query: текст текущего или последнего запроса обслуживающего процесса.
Query duration: длительность текущего или последнего запроса обслуживающего процесса.
Table size: размер таблицы, для которой выполняется копирование.
Table tuples total: строки таблицы, для которой выполняется копирование.
Столбец содержит дополнительную информацию:
Tuples processed: количество обработанных строк таблицы.
Tuples excluded: количество пропущенных строк таблицы.
Source file size: размер копируемого файла.
Done, %: процент выполнения копирования.
Столбец содержит дополнительную информацию:
Processed: размер обработанных данных.
Command: текст команды копирования.
Command type: тип команды копирования.
Действия.
За подробной информацией о доступных действиях обратитесь к соответствующим инструкциям.
57.8.2. Отмена процесса копирования #
При отмене процесса копирования пользовательский сеанс не завершается.
Чтобы отменить процесс копирования:
Перейдите к процессам копирования одним из следующих способов:
Через раздел мониторинга:
В навигационной панели перейдите в Мониторинг → Активность.
Выберите вкладку Копирование, затем в правом верхнем углу страницы выберите экземпляр и базу данных.
Через раздел настройки экземпляра:
В навигационной панели перейдите в Инфраструктура → Экземпляры.
Нажмите на имя экземпляра.
В навигационной панели перейдите в Активность.
Выберите Копирование, затем в правом верхнем углу страницы выберите базу данных.
Нажмите
рядом с процессом копирования.Нажмите Выполнить.
57.8.3. Завершение пользовательского сеанса для процесса копирования #
При завершении пользовательского сеанса автоматически отменяется процесс копирования.
Чтобы завершить пользовательский сеанс для процесса копирования:
Перейдите к процессам копирования одним из следующих способов:
Через раздел мониторинга:
В навигационной панели перейдите в Мониторинг → Активность.
Выберите вкладку Копирование, затем в правом верхнем углу страницы выберите экземпляр и базу данных.
Через раздел настройки экземпляра:
В навигационной панели перейдите в Инфраструктура → Экземпляры.
Нажмите на имя экземпляра.
В навигационной панели перейдите в Активность.
Выберите Копирование, затем в правом верхнем углу страницы выберите базу данных.
Нажмите рядом с процессом копирования.
Нажмите Выполнить.
57.8. Copying Processes #
You can view information about copying processes (COPY). The information is based on the pg_stat_progress_copy view.
57.8.1. Viewing Copying Processes #
Go to copying processes in one of the following ways:
Using the monitoring section:
In the navigation panel, go to Monitoring → Activity.
Select Copy, and then in the top-right corner of the page, select the instance and database.
Using the configuration section of an instance:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Activity.
Select Copy, and then in the top-right corner of the page, select the database.
The table of copying 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_activitymodule (refer to thestatecolumn).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_activitymodule (refer towait_event_typeandwait_eventcolumns).Database: The name of the database where copying is being performed.
User: The name of the DBMS user on behalf of which copying is being performed.
Table: The name or ID of the table being copied.
Query: The text of the current or last backend query.
Query duration: The duration of the current or last backend query.
Table size: The size of the table being copied.
Table tuples total: Rows of the table being copied.
This column includes additional information:
Tuples processed: The number of processed table rows.
Tuples excluded: The number of excluded table rows.
Source file size: The size of the file being copied.
Done, %: The completion percentage of copying.
This column includes additional information:
Processed: The size of the processed data.
Command: The text of the copying command.
Command type: The type of the copying command.
Actions.
For more information about available actions, refer to the corresponding instructions.
57.8.2. Canceling a Copying Process #
Canceling a copying process does not terminate a user session.
To cancel a copying process:
Go to copying processes in one of the following ways:
Using the monitoring section:
In the navigation panel, go to Monitoring → Activity.
Select Copy, and then in the top-right corner of the page, select the instance and database.
Using the configuration section of an instance:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Activity.
Select Copy, and then in the top-right corner of the page, select the database.
Click
next to the copying process. Click Execute.
57.8.3. Terminating the User Session for a Copying Process #
When the user session is terminated, the copying process is canceled automatically.
To terminate the user session for a copying process:
Go to copying processes in one of the following ways:
Using the monitoring section:
In the navigation panel, go to Monitoring → Activity.
Select Copy, and then in the top-right corner of the page, select the instance and database.
Using the configuration section of an instance:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Activity.
Select Copy, and then in the top-right corner of the page, select the database.
Click next to the copying process.
Click Execute.