| Предупреждение |
|---|
| Do not power We highly recommend not shutting down the DB server off with the power button: in certain cases, this may cause the DB corruption. |
When doing routine database maintenance, you must follow the established orderIf you need to carry out routine maintenance on the database server, take the following steps: - Close all instances of the Management Console. Make sure that all connections of other programs to DB Traffic Monitor schema are closed; if there’re there are any active connections, disable them.
- Stop all TM processes on Traffic Monitor server:
service iwtm stop
service iwtm-php-fpm stop
service nginx stop - Retrieve list On the database server, retrieve the list of scheduled jobs from database server. For this purpose , in psql, under the account of the database schema owner, run the following query in sqlplus using schema owner account:
select job_namejobname, case when job_agent_id jobagentid is null , then 'scheduled' else 'running' end state
from pgagent.pga_job
where jobenabled= true; - Disable jobs by running the following script:
select iwtm.pkg_utility_disable_job('JOB_1); ...
select iwtm.pkg.utility_disable_job('JOB_N');
commit; where JOB_1… JOB_N are the names of tasks jobs to disablebe disabled. - To make sure that none of these jobs is running there are no running jobs, run the following query:
select pga_job_name.jobname
from pgagent.pga_job
where job_agent_id pga_job.jobagentid is not null; current A current task cannot be stopped in PostgreSQL, this should be done by stopping the agent from Linux using thу following command:
service stop pgagent-9.66 stop (suspending stopping all the tasks with one command) - Make all the necessary operations with the database.
- After all required operations are made check all operations are complete, check the connection to the database server from Traffic Monitor server:
psql -p 5433 -h server_name postgres postgres where server_name - database name or ip IP address If the test is successful, the following psql invitation is to occurwill appear:
postgre=# - Run the processes of the Traffic Monitor server processes:
service iwtm start
service iwtm-php-fpm start
service nginx start - Check if the system log contains errors. The path to the system log:
/var/log/messages - If the system log contains any error messages, consult the technical support service.
- Enable running previously disabled jobs:
BEGIN
select iwtm.pkg_utility_enable_job('JOB_1');
…
select iwtm.pkg_utility_enable_job('JOB_N'); commit;
end;
/ where JOB_1… JOB_N are the names of the previously stopped jobs.
|