Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit
Date: 2021-11-01 06:22:50
Message-ID: 65af8fb4-4c45-9cc3-c6ec-80f3ac488e07@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021/10/31 18:05, Etsuro Fujita wrote:
> Hi,
>
> As I said before [1], I’m working on $SUBJECT. Attached is a WIP
> patch for that.

Thanks for the patch!

> The patch is pretty simple: if a server option added
> by the patch “parallel_commit” is enabled,

Could you tell me why the parameter is necessary?
Can't we always enable the feature?

> * RELEASE
> parallel_commit=0: 0.385 ms
> parallel_commit=1: 0.221 ms
>
> * COMMIT
> parallel_commit=0: 1.660 ms
> parallel_commit=1: 0.861 ms
>
> With the option enabled, the average latencies for both commands are
> reduced significantly!

Sounds great!

> I think we could extend this to abort cleanup of remote
> (sub)transactions during post-abort. Anyway, I think this is useful,
> so I’ll add this to the upcoming commitfest.

Thanks!

+ /* Consume whatever data is available from the socket */
+ if (!PQconsumeInput(conn))
+ pgfdw_report_error(ERROR, NULL, conn, false, sql);

Without the patch, PQconsumeInput() is not called before pgfdw_get_result()
But could you tell me why you added PQconsumeInput() there?

When ignore_errors argument is true, the error reported by
PQconsumeInput() should be ignored?

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2021-11-01 06:28:16 Re: Some RELKIND macro refactoring
Previous Message Peter Eisentraut 2021-11-01 06:09:15 Re: Non-decimal integer literals