| От | Tom Lane |
|---|---|
| Тема | Re: Re: Strangeness in xid allocation / snapshot setup |
| Дата | |
| Msg-id | 11523.994963043@sss.pgh.pa.us обсуждение |
| Ответ на | RE: Re: Strangeness in xid allocation / snapshot setup ("Mikheev, Vadim" <vmikheev@SECTORBASE.COM>) |
| Список | pgsql-hackers |
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes:
>> Given this, I'm wondering why we bother with having a separate
>> XidGenLock spinlock at all. Why not eliminate it and use SInval
>> spinlock to lock GetNewTransactionId and ReadNewTransactionId?
> Reading all MyProc in GetSnashot may take long time - why disallow
> new Tx to begin.
Because we need to synchronize? It bothers me that we're assuming
that fetching/storing XIDs is atomic. There's no possibility at all
of going to 8-byte XIDs as long as the code is like this.
I doubt that a spinlock per PROC structure would be a better answer,
either; the overhead of getting and releasing each lock would be
nontrivial, considering the small number of instructions spent at
each PROC in these routines.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера