Due to the use of the PostgreSQL database, there is no data. Had to do Google.
Finally found a solution in an English forum.
As follows:
1. Retrieves the ID of the deadlock process
Copy Code code as follows:
SELECT * from pg_stat_activity WHERE datname= ' deadlock database ID ';
In the retrieved field, the "wating" field, the one with the data T, is the deadlock process. Find the value of the corresponding "Procpid" column.
2. Kill the Process
Copy Code code as follows:
SELECT pg_cancel_backend (' procpid value of the deadlock data ');
Results: After the run, update the table again, the SQL executes smoothly.
PS: Look up the database of its own list of functions, found that the pg_terminate_backend () function can also kill the process.
The content that the official net gives: http://www.postgresql.org/docs/9.0/static/functions-admin.html