[ Forgot the list, resending. ] 2009/12/16 Boszormenyi Zoltan <z...@cybertec.at>:
> Robert Haas írta: > >> On Wed, Dec 16, 2009 at 1:25 PM, Robert Haas <robertmh...@gmail.com> wrote: >> >>> On Wed, Dec 16, 2009 at 1:14 PM, Alvaro Herrera >>> <alvhe...@commandprompt.com> wrote: >>> >>>> So you'd have to disable HOT updates when true serializability was >>>> active? >>> >>> I thought about that, but I don't think so. HOT only applies to >>> updates, and predicate locking only applies to inserts. Unless I have >>> my head in the sand? >> >> Err, no, wait. Predicate locking can apply to updates, but since HOT >> updates never update an indexed column, I think we might still be OK? > > A predicate can include columns from an index plus others. > Am I missing something? This whole concept ("next-key locking") also applies in case there are no indexes. In the case of a table scan, the "next key" is either the next row relative to the scanned range (if the DBMS supports the notion of non-full table scans, for example if the table contents are themselves stored in sorted order), or something that indicates that the whole table was scanned (i.e., a table lock). Therefore, with next-key locking you better don't have too many table scans if you want to have any concurrent transactions. Nicolas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers