Re: Store FullTransactionId in TwoPhaseFileHeader/GlobalTransactionData

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Store FullTransactionId in TwoPhaseFileHeader/GlobalTransactionData
Date: 2019-08-05 01:15:19
Message-ID: CA+hUKG+YyKwvSO3ctie9wB7u-3XYtkRnfM5bfP_b6vS5FGGc_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 3, 2019 at 12:06 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, Aug 2, 2019 at 6:37 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-08-05 01:44:16 Re: Store FullTransactionId in TwoPhaseFileHeader/GlobalTransactionData
Previous Message Alvaro Herrera 2019-08-04 22:43:49 Re: Problem with default partition pruning