Re: Transactions involving multiple postgres foreign servers, take 2 - Mailing list pgsql-hackers

From Ranier Vilela
Subject Re: Transactions involving multiple postgres foreign servers, take 2
Date
Msg-id CAEudQArYLAdtGt4va5LJtuLY2DLRxdppQjjSMyRwv_avBJwYCQ@mail.gmail.com
Whole thread Raw
In response to RE: Transactions involving multiple postgres foreign servers, take 2  ("r.takahashi_2@fujitsu.com" <r.takahashi_2@fujitsu.com>)
Responses RE: Transactions involving multiple postgres foreign servers, take 2  ("r.takahashi_2@fujitsu.com" <r.takahashi_2@fujitsu.com>)
List pgsql-hackers
Em ter., 13 de jul. de 2021 às 01:14, r.takahashi_2@fujitsu.com <r.takahashi_2@fujitsu.com> escreveu:
Hi Sawada-san,


Thank you for your reply.

> Not sure but it might be possible to keep holding an xlogreader for
> reading PREPARE WAL records even after the transaction commit. But I
> wonder how much open() for wal segment file accounts for the total
> execution time of 2PC. 2PC requires 2 network round trips for each
> participant. For example, if it took 500ms in total, we would not get
> benefits much from the point of view of 2PC performance even if we
> improved it from 14ms to 1ms.

I made the patch based on your advice and re-run the test on the new machine.
(The attached patch is just for test purpose.)
Wouldn't it be better to explicitly initialize the pointer with NULL?
I think it's common in Postgres.

static XLogReaderState *xlogreader = NULL;



* foreign_twophase_commit = disabled
2686tps

* foreign_twophase_commit = required (It is necessary to set -R ${RATE} as Ikeda-san said)
311tps

* foreign_twophase_commit = required with attached patch (It is not necessary to set -R ${RATE})
2057tps
Nice results.

regards,
Ranier Vilela

pgsql-hackers by date:

Previous
From: Ibrar Ahmed
Date:
Subject: Re: a misbehavior of partition row movement (?)
Next
From: Ibrar Ahmed
Date:
Subject: Re: POC: GROUP BY optimization