S skills, Postgres skills
If you need to add indexes when the business volume is large, you need to use CONCURRENTLY. Otherwise, your database will easily break down.
For example
create index CONCURRENTLY idx_order_records_bank_statist_uid on order_records(statist_uid)
See
Http://www.postgresql.org/docs/9.1/static/sql-createindex.html
In a large business volume, if you want to execute some time-consuming database tasks, sometimes you will find that a task is still secretly executed and needs to be manually disabled.
If you use the pid corresponding to kill, you may encounter database problems.
The insurance method is to use PG_CANCEL_BACKEND.
Find the corresponding PID through the following:
select pid, trim(starttime) as start,
duration, trim(user_name) as user,
substring (query,1,40) as querytxt
from stv_recents
where status = 'Running';
View
select pg_cancel_backend(802);
Kill the task as follows:
pg_cancel_backend( pid )
Http://docs.aws.amazon.com/redshift/latest/dg/PG_CANCEL_BACKEND.html
Postgres Problems
1 bossjzl17 answered the command line solution
2. You can use the pgadmin graphical client tool to solve the problem.
When installing PostgreSQL on windows, select pgadmin.
If PostgreSQL is installed on Linux, you must install the pgadmin client separately.
You can also install the pgadmin client on windows to connect to linux.
Pgadmin has a wizard for import and export,
If it is helpful to you, please remember to adopt a satisfactory answer. Thank you! Wish you a happy life!
Vaela
Postgres Installation Problems
An error occurred while completely deleting and re-installing the database. Most of the problems were caused by the system environment.