Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit
Date
Msg-id 65af8fb4-4c45-9cc3-c6ec-80f3ac488e07@oss.nttdata.com
Whole thread Raw
In response to postgres_fdw: commit remote (sub)transactions in parallel during pre-commit  (Etsuro Fujita <etsuro.fujita@gmail.com>)
Responses Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit
List 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



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Non-decimal integer literals
Next
From: Peter Eisentraut
Date:
Subject: Re: Some RELKIND macro refactoring