Re: Compressing the AFTER TRIGGER queue

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: Compressing the AFTER TRIGGER queue
Дата
Msg-id CAEZATCXk14N+rtefhkijHvbdZhAG=qmBj7qizn2xZ5khM=DMBQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Compressing the AFTER TRIGGER queue  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Compressing the AFTER TRIGGER queue  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 1 August 2011 18:36, Robert Haas <robertmhaas@gmail.com> wrote:
> On Mon, Aug 1, 2011 at 1:31 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Dean Rasheed <dean.a.rasheed@gmail.com> writes:
>>> On 1 August 2011 17:49, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> Ummm ... I only read the data structure comments, not the code, but I
>>>> don't see where you store the second CTID for an update event?
>>
>>> Ah yes, I forgot to mention that bit. I'm using
>>> &(tuple1.t_data->t_ctid) to get the second CTID from the old tuple. Is
>>> that safe?
>>
>> Hmmmm ... not sure.  It seems a bit scary, but on the other hand we
>> should be able to assume that the updating subtransaction hasn't been
>> rolled back (else surely we shouldn't be firing the trigger).  So in
>> principle it seems like the t_ctid link can't have been replaced.
>> This will foreclose any ideas about collapsing t_ctid link chains,
>> if anyone had it in mind to do that.
>
> Don't we already do that when pruning HOT chains?
>

I thought that only happens after the transaction is committed, and
old enough, whereas the trigger code only needs to follow the chain in
the updating transaction.

Regards,
Dean


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: One-Shot Plans
Следующее
От: David Fetter
Дата:
Сообщение: Re: libedit memory stomp is apparently fixed in OS X Lion