Skill 2.1.6
Manage locks to prevent access to data (for example, Amazon Redshift, Amazon RDS)
Key Concepts
Redshift uses table-level locks (AccessShareLock for reads, ShareRowExclusiveLock for writes, AccessExclusiveLock for DDL); serializable isolation can raise serialisation errors. Use the LOCK command for explicit locking, view locks in STV_LOCKS / SVV_TRANSACTIONS, and end blocking sessions with PG_TERMINATE_BACKEND.
RDS engines (MySQL InnoDB, PostgreSQL) use row-level locks; long transactions and missing indexes cause contention and deadlocks; monitor with CloudWatch Database Insights and pg_locks or information_schema.