The 'Check for long-running transactions in source database' precheck item returns a warning
Updated at:
During the Precheck phase, DTS checks whether the source database has uncommitted transactions that have been running for more than 5 minutes. If any are found, the Source Database Long-Transaction Detection item returns a warning.
Why this happens
The source database type is PostgreSQL, PolarDB for PostgreSQL, or PolarDB (Compatible with Oracle), and the source database has one or more transactions that have been uncommitted for more than 5 minutes.
Solution
Log in to the source database and run the following SQL to identify long-running transactions:
SELECT pid, usename, datname, query, state, EXTRACT(EPOCH FROM (NOW() - xact_start)) AS duration FROM pg_stat_activity WHERE state IN ('idle in transaction', 'active') AND (NOW() - xact_start) > INTERVAL '300 seconds' ORDER BY xact_start;If your business operations allow, commit or roll back each long-running transaction to release lock resources.
Return to the Precheck page and click Precheck Again.
Follow the on-screen instructions to complete the task.
Is this page helpful?