- 최신
- 최다 투표
- 가장 많은 댓글
In Redshift, explicitly locking using the lock command is acquired in "ACCESS EXCLUSIVE" mode and is released when the transaction that contains the LOCK command completes.
To determine which transactions might be facing/causing serialization isolation error, you can refer system table STL_TR_CONFLICT , which has information to identify transaction conflicts that result from serializable isolation errors ->https://docs.aws.amazon.com/redshift/latest/dg/r_STL_TR_CONFLICT.html
Based on which , you should get
-> a tablename( by determining the locks using svv_transactions and the associated relation id , which can then be used to determine table name in svv_table_info )
---****
-> https://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TRANSACTIONS.html -> https://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TABLE_INFO.html
-> 2 or more transaction ids (xids) that are involved in the conflict (stl_tr_conflict) and are forming cycles. ---****
Using the above you can determine the sequence of statements executed in those by querying svl_statementtext which led to this error
-> https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_STATEMENTTEXT.html
Moreover, managing transactions inside a stored procedure is a good walk-through of how to layout your code -> https://docs.aws.amazon.com/redshift/latest/dg/stored-procedure-transaction-management.html
관련 콘텐츠
- AWS 공식업데이트됨 4달 전
- AWS 공식업데이트됨 2년 전