Martijn van Oosterhout <kleptog@xxxxxxxxx> writes: > I think what you're missing here is that RowExclusiveLocks are taken by > marking the row itself. More specifically: row-level locks are not reflected in pg_locks at all. A RowExclusiveLock entry in pg_locks reflects a *table* level lock, which is taken by any INSERT/UPDATE/DELETE command on the table, independently of how many rows it modifies (even zero). The purpose of that type of lock is to prevent concurrent DDL changes on the table, not to serialize the row-level operations. There are locks that will show up in pg_locks that are taken transiently when attempting to mark a row modified, but they don't persist after the mark has been made, and the details have changed from time to time in different PG versions. So I'd suggest testing it to see exactly what you get. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general