Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Дата
Msg-id CAM3SWZRmqTe=aaaK=C1LdHWoWrVndCx0+-2zYcn8-Ay1t_3+=g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Список pgsql-hackers
On Fri, Sep 26, 2014 at 3:25 PM, Peter Geoghegan <pg@heroku.com> wrote:
> On Fri, Sep 26, 2014 at 3:11 PM, Alvaro Herrera
> <alvherre@2ndquadrant.com> wrote:
>> FWIW there are 28 callers of HeapTupleHeaderGetXmin.

> Don't forget about direct callers to HeapTupleHeaderGetRawXmin(),
> though. There are plenty of those in tqual.c.

Which reminds me: commit 37484ad2 added the opportunistic freezing
stuff. To quote the commit message:

"""
Instead of changing the tuple xmin to FrozenTransactionId, the combination
of HEAP_XMIN_COMMITTED and HEAP_XMIN_INVALID, which were previously never
set together, is now defined as HEAP_XMIN_FROZEN.  A variety of previous
proposals to freeze tuples opportunistically before vacuum_freeze_min_age
is reached have foundered on the objection that replacing xmin by
FrozenTransactionId might hinder debugging efforts when things in this
area go awry; this patch is intended to solve that problem by keeping
the XID around (but largely ignoring the value to which it is set).

"""

Why wouldn't the same objection (the objection that the earlier
opportunistic freezing ideas stalled on) apply to directly setting
tuple xmin to InvalidTransactionId?

You get the idea, though: Making promise tuples possible to release
early (before transaction end) by setting tuple xmin to
InvalidTransactionId is certainly hard to get right, and seems
dangerous.

-- 
Peter Geoghegan



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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: proposal: rounding up time value less than its unit.
Следующее
От: Gregory Smith
Дата:
Сообщение: Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]