Re: Select for update with offset interferes with concurrent transactions
В списке pgsql-general по дате отправления:
| От | Radosław Smogura |
|---|---|
| Тема | Re: Select for update with offset interferes with concurrent transactions |
| Дата | |
| Msg-id | 201102012005.22670.rsmogura@softperience.eu обсуждение исходный текст |
| Ответ на | Re: Select for update with offset interferes with concurrent transactions (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
Hmm... May I ask how this look in details. If e.g. I do select * from myeshop offset 100 limit 20, I have 1000 rows which rows will be locked? a) 0 to 120, or b) all rows will be locked.? Kind regards, Radek Tom Lane <tgl@sss.pgh.pa.us> Tuesday 01 February 2011 18:18:17 > In 9.0, LIMIT/OFFSET processing is done after FOR UPDATE locking, which > means that rows skipped over by OFFSET still get locked, which means > that different sessions executing this query are now practically certain > to block each other, rather than just likely to block each other. > This was an intentional change to improve the predictability of FOR > UPDATE's interactions with LIMIT/OFFSET, and indeed it's improved the > predictability of the behavior for you, just not in the direction you'd > like :-( > > regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера