Re: SIREAD lock versus ACCESS EXCLUSIVE lock

Поиск
Список
Период
Сортировка
От Dan Ports
Тема Re: SIREAD lock versus ACCESS EXCLUSIVE lock
Дата
Msg-id 20110606055808.GB26076@csail.mit.edu
обсуждение исходный текст
Ответ на Re: SIREAD lock versus ACCESS EXCLUSIVE lock  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
On Sun, Jun 05, 2011 at 12:45:41PM -0500, Kevin Grittner wrote:
> Is this possible?  If a transaction gets its snapshot while OID of N
> is assigned to relation X, can that transaction wind up seeing an OID
> of N as a reference to relation Y?  If not, there aren't any false
> positives possible.

This ought to be possible, assuming that the transaction doesn't try to
read (and take an AccessShareLock on) X.

On the other hand, given all the timing constraints you've noted, I
think it's reasonable to ignore the risk of false positives here. What
you're saying is that we might inadvertently roll back a transaction,
if a table gets dropped and a new table created and assigned the same
OID, and there's an uncommitted transaction that started before the
DROP, *and* certain other conditions hold about the reads and timing of
overlapping transactions.

This combination of conditions seems quite unlikely and I have a hard
time getting too worked up about it. Occasional false positives are
already a fact of life when using SSI.

Dan

-- 
Dan R. K. Ports              MIT CSAIL                http://drkp.net/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Darren Duncan
Дата:
Сообщение: Re: Range Types and extensions
Следующее
От: Robert Haas
Дата:
Сообщение: Re: heap vacuum & cleanup locks