Re: Store FullTransactionId in TwoPhaseFileHeader/GlobalTransactionData

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Store FullTransactionId in TwoPhaseFileHeader/GlobalTransactionData
Дата
Msg-id CA+hUKG+YyKwvSO3ctie9wB7u-3XYtkRnfM5bfP_b6vS5FGGc_A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Store FullTransactionId in TwoPhaseFileHeader/GlobalTransactionData  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Store FullTransactionId inTwoPhaseFileHeader/GlobalTransactionData  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Sat, Aug 3, 2019 at 12:06 AM Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Aug 2, 2019 at 6:37 AM Thomas Munro <thomas.munro@gmail.com> wrote:
> > Thanks.  This looks pretty reasonable to me, and I don't think we need
> > to worry about the subxid list for now.
>
> Why not just do them all at once?

[tries for a couple of hours and abandons for now]

It's a bit of a can of worms.  To do it properly, I think
TransactionStateData::childXids needs to become a pointer to a
FullTransactionId array called childFxids, so that
xactGetCommittedChildren() can return it, and that causes knock on
effects all over the tree, at least xactdesc.c, clog.c, commit_ts.c,
transam.c, twophase.c, xact.c need adjusting and you finish up writing
the subxact array into various places in the WAL in 64 bit format (but
not yet the main xid).  Alternatively you need to convert the array of
FullTransactionId into an array of TransactionId in various places, or
convert TransactionId into FullTransactionId just for the 2PC stuff,
but both of those are cop outs and require allocating extra copies.
Of course I am in favour of moving more things to 64 bit format, but I
don't want to do them all at once, and there are a number of policy
decisions hiding in there, and it's not strictly needed for the change
that Vignesh proposes.  Vignesh's patch achieves something important
on its own: it avoids the needs for zheap to do a 32->64 conversion.

-- 
Thomas Munro
https://enterprisedb.com



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Problem with default partition pruning
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Store FullTransactionId inTwoPhaseFileHeader/GlobalTransactionData