Tom Lane wrote: > "Kevin Grittner" writes: >> Tom Lane wrote: >>> (Besides which the lock acquired by UPDATE isn't exclusive and >>> wouldn't block anyway...) >> It blocks other UPDATEs. > Not at the table level. The question was about whether we could change the timing of when we get the current locks, not about getting different locks than we currently do. Clearly, adding a table lock would make no sense. > If you could lock only at the tuple level maybe you'd have > something, but it seems like you can't find the target tuples > without having acquired a snapshot. That would be the fatal difference then. InnoDB doesn't actually keep old versions of a row; it generates them from "undo" records in the log when needed, which might be why it was feasible to get the lock before the snapshot there. If we need the snapshot before we can get the lock, it's not an optimization which is available to us. Thanks, -Kevin
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера