Re: [HACKERS] It sorta works, but I'm confused about locking
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] It sorta works, but I'm confused about locking |
| Дата | |
| Msg-id | 20730.907006146@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [HACKERS] It sorta works, but I'm confused about locking (Massimo Dal Zotto <dz@cs.unitn.it>) |
| Список | pgsql-hackers |
Massimo Dal Zotto <dz@cs.unitn.it> writes:
>> it's not at all clear whether I should call RelationUnsetLockForWrite
>> at the end of the routine or not; some existing code does, some doesn't.
> It is not done where there is an immediate CommitTransactionCommand which
> already releases the locks.
Hmm. OK, but I guess I don't really understand why it's ever valid to
release a lock before the end of the transaction --- and
CommitTransactionCommand isn't necessarily the end of the transaction
anyway, if you're inside a transaction block.
Basically: it seems to me it's a bug to call UnsetLock (any flavor)
from *anywhere* except transaction commit. If this is not so, why not?
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера