Re: Do we need so many hint bits?
| От | Tom Lane | 
|---|---|
| Тема | Re: Do we need so many hint bits? | 
| Дата | |
| Msg-id | 15965.1353448726@sss.pgh.pa.us обсуждение исходный текст | 
| Ответ на | Re: Do we need so many hint bits? (Merlin Moncure <mmoncure@gmail.com>) | 
| Список | pgsql-hackers | 
Merlin Moncure <mmoncure@gmail.com> writes:
> Hm, I wonder if you could squeeze two bits out. ISTM here are the
> interesting cases enumerated:
> 0: xmin unknown
> 1: xmin invalid
> 2: xmin valid, xmax unknown
> 3: xmin valid, xmax invalid
> 4: xmin valid, xmax valid
> Did I miss any?
Yes.  xmin unknown, xmax unknown is possible and different from all the
above, ie a tuple can be deleted by the creating transaction.  (But it
could still be visible to some of that transaction's snapshots, so you
can't equate this state to "xmin invalid".)
There's a fairly big problem with any of these ideas, and it's not
even on-disk compatibility.  It is that we assume that hint bits can be
set without exclusive lock on the buffer.  If any of the transitions
xmin unknown -> xmin committed, xmin unknown -> xmin aborted,
xmax unknown -> xmax committed, xmax unknown -> xmax aborted
aren't expressed by setting a bit that wasn't set before, we probably
lose that property, and thereby a whole lot of concurrency.
        regards, tom lane
		
	В списке pgsql-hackers по дате отправления: