Re: [HACKERS] logical decoding of two-phase transactions

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Ajin Cherian <itsajin(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] logical decoding of two-phase transactions
Date: 2020-11-09 06:23:22
Message-ID: CAHut+PuR=nSPOVMmWyuk5P=oqCMnoE3=ZnZ6vrfPkBAeuExGjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > 4.
> > +static void
> > +apply_handle_prepare_txn(LogicalRepPrepareData * prepare_data)
> > +{
> > + Assert(prepare_data->prepare_lsn == remote_final_lsn);
> > +
> > + /* The synchronization worker runs in single transaction. */
> > + if (IsTransactionState() && !am_tablesync_worker())
> > + {
> > + /* End the earlier transaction and start a new one */
> > + BeginTransactionBlock();
> > + CommitTransactionCommand();
> > + StartTransactionCommand();
> >
> > There is no explanation as to why you want to end the previous
> > transaction and start a new one. Even if we have to do so, we first
> > need to call BeginTransactionBlock before CommitTransactionCommand.

Done

---

Also...

pgindent has been run for all patches now.

The latest of all six patches are again reunited with a common v18
version number.

PSA

Kind Regards,
Peter Smith.
Fujitsu Australia.

Attachment Content-Type Size
v18-0001-Support-2PC-txn-base.patch application/octet-stream 39.1 KB
v18-0003-Support-2PC-test-cases-for-test_decoding.patch application/octet-stream 33.3 KB
v18-0004-Support-2PC-txn-spoolfile.patch application/octet-stream 3.9 KB
v18-0005-Support-2PC-txn-pgoutput.patch application/octet-stream 21.4 KB
v18-0002-Support-2PC-txn-backend.patch application/octet-stream 30.8 KB
v18-0006-Support-2PC-txn-subscriber-tests.patch application/octet-stream 34.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message osumi.takamichi@fujitsu.com 2020-11-09 06:30:55 RE: Disable WAL logging to speed up data loading
Previous Message Greg Stark 2020-11-09 06:23:12 Re: Temporary tables versus wraparound... again