Re: [HACKERS] logical decoding of two-phase transactions - Mailing list pgsql-hackers

From Peter Smith
Subject Re: [HACKERS] logical decoding of two-phase transactions
Date
Msg-id CAHut+PuR=nSPOVMmWyuk5P=oqCMnoE3=ZnZ6vrfPkBAeuExGjA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] logical decoding of two-phase transactions  (Peter Smith <smithpb2250@gmail.com>)
Responses Re: [HACKERS] logical decoding of two-phase transactions
List 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

pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Temporary tables versus wraparound... again
Next
From: "osumi.takamichi@fujitsu.com"
Date:
Subject: RE: Disable WAL logging to speed up data loading