【openGauss/PostgreSQL】openGauss或PostgreSQL查看锁表详细信息并生成解锁SQL语句
/* openGauss或PostgreSQL查看锁表详细信息并生成解锁SQL语句 */
select case when a.pid<>0
then 'select pg_terminate_backend('||a.pid||');'
else 'select pg_terminate_session(0,'
/* openGauss或PostgreSQL查看锁表详细信息并生成解锁SQL语句 */
select case when a.pid<>0
then 'select pg_terminate_backend('||a.pid||');'
else 'select pg_terminate_session(0,'