Tuples inserted and deleted by the same transaction

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Tuples inserted and deleted by the same transaction
Дата
Msg-id f6a491b32cb44bb5daaafec835364f7149348fa1.camel@cybertec.at
обсуждение исходный текст
Ответы Re: Tuples inserted and deleted by the same transaction  (Nikita Malakhov <hukutoc@gmail.com>)
Список pgsql-hackers
Shouldn't such tuples be considered dead right away, even if the inserting
transaction is still active?  That would allow cleaning them up even before
the transaction is done.

There is this code in HeapTupleSatisfiesVacuumHorizon:

        else if (TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetRawXmin(tuple)))
        {
            [...]
            /* inserted and then deleted by same xact */
            if (TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetUpdateXid(tuple)))
                return HEAPTUPLE_DELETE_IN_PROGRESS;

Why HEAPTUPLE_DELETE_IN_PROGRESS and not HEAPTUPLE_DEAD?

Yours,
Laurenz Albe



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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Error "initial slot snapshot too large" in create replication slot
Следующее
От: bt22kawamotok
Дата:
Сообщение: Re: is_superuser is not documented