Store FullTransactionId in TwoPhaseFileHeader/GlobalTransactionData

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Store FullTransactionId in TwoPhaseFileHeader/GlobalTransactionData
Date: 2019-08-01 09:32:14
Message-ID: CALDaNm2fFeQC_SbM_LsSPNZG3HZ0SC34szY+451iW7oysAb8Cw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

In the undo system, we use full-transaction-id for transactions. For
rollback of prepared transactions, we were planning to use
FullTransactionId by combining TransactionId and epoch, but as
suggested by multiple people in that email chain [1][2], the better
idea is to store Full-transactionid in TwoPhaseFileHeader

Backward compatibility need not be handled for this scnario as upgrade
does not support having open prepared transactions.

There is also one more comment which is yet to be concluded. The
comment discusses about changing subxids which are of TransactionId
type to FullTransactionId type being written in two phase transaction
file. We could not conclude this as the data is similarly stored in
TransactionStateData.

Please find the patch having the fix for Storing FullTransactionId in
TwoPhaseFileHeader/GlobalTransactionData.

Let me know your opinion on the patch and above comment.

[1]
https://www.postgresql.org/message-id/CA%2BhUKGJ%2BPg2gE9Hdt6fXHn6ezV7xJnS%2Brm-38ksXZGXYcZh3Gg%40mail.gmail.com
[2]
https://www.postgresql.org/message-id/CAA4eK1L9BhvnQfa_RJCTpKQf9QZ15pyUW7s32BH78iBC3KbV0g%40mail.gmail.com

Regards,
Vignesh
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
Store_FullTransactionId_TwoPhaseFileHeader_GlobalTransactionData.patch application/octet-stream 11.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-08-01 09:34:34 Re: refactoring - share str2*int64 functions
Previous Message Kohei KaiGai 2019-08-01 09:28:08 Re: How to retain lesser paths at add_path()?