In Microsoft SQL Server, the code below is used to get the IX (Intent Exclusive) lock:
SELECT request_mode FROM sys.dm_tran_locks WHERE resource_database_id = DB_ID() AND resource_associated_entity_id = OBJECT_ID(N'dbo.cars');
pg_locks table is available to tell locks information. However, there are many types of
locktype, which are:
relation, extend, frozenid, page, tuple, transactionid, virtualxid, object, userlock, or advisory
Which types of
pg_locks is equivalent to IX (Intent Exclusive) lock from Microsoft SQL Server?
locktype is the wrong column to look at
pg_locks, please advise which column in
pg_locks should I use?