Re: comments around heap_lock_tuple confus{ing,ed} around deletedtuples

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: comments around heap_lock_tuple confus{ing,ed} around deletedtuples
Дата
Msg-id 20180404214442.zakck6rssdhiyn3p@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: comments around heap_lock_tuple confus{ing,ed} around deletedtuples  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Hi,

On 2018-04-04 18:34:26 -0300, Alvaro Herrera wrote:
> > It's also fairly weird that heap_lock_updated_tuple() returns
> >     /* nothing to lock */
> >     return HeapTupleMayBeUpdated;
> > when the tuple has been deleted (and thus
> > ItemPointerEquals(&tuple->t_self, ctid)). That'll not get returned by
> > heap_lock_tuple() itself, but seems thoroughly confusing.
> 
> Yeah, what MayBeUpdated is supposed to mean in this case is "there is no
> error, we were able to do the thing we were asked to do", rather than
> exactly "yes, you may update the tuple".  I guess you could argue that
> reusing HTSU result values for it was wrong.  It was certainly
> convenient.

I think just adding a comment along those lines should be good enough...

Greetings,

Andres Freund


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: comments around heap_lock_tuple confus{ing,ed} around deletedtuples
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: WIP: Covering + unique indexes.