Search Postgresql Archives

Transaction lock granting order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can someone point me to documentation on (or confirm) this detail on Postgres locking?

- Transaction X starts and acquires a lock on a table T
- Transaction Y starts and attempts to acquire a conflicting lock on T - it is now blocked
- Transaction Z starts and also attempts to acquire a conflicting lock on T - it is now blocked

Is txn Y guaranteed to be the first txn to proceed once X finishes? Is there some "lock queue order" that is respected? Is there any chance Z can proceed before Y, say if it acquires a less aggressive lock?

Put differently: when txn Y starts, it has to wait. Is this wait time at most the length of the longest txn older than Y?

Thanks,
Josh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux