Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit
David Zhang <david.zhang@highgo.ca>
From: David Zhang <david.zhang@highgo.ca>
To: Fujii Masao <masao.fujii@oss.nttdata.com>,
Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-18T21:55:19Z
Lists: pgsql-hackers
Thanks a lot for updating the patch. Tried to apply the patches to master branch, no warning found and regression test passed. Now, we have many places (5) calling the same function with a constant number 30000. Is this a good time to consider redefine this number a macro somewhere? Thank you, On 2022-02-17 8:46 a.m., Fujii Masao wrote: > > > On 2022/02/11 21:59, Etsuro Fujita wrote: >> I tweaked comments/docs a little bit as well. > > Thanks for updating the patches! > > I reviewed 0001 patch. It looks good to me except the following minor > things. If these are addressed, I think that the 001 patch can be > marked as ready for committer. > > + * Also determine to commit (sub)transactions opened on the > remote server > + * in parallel at (sub)transaction end. > > Like the comment "Determine whether to keep the connection ...", > "determine to commit" should be "determine whether to commit"? > > "remote server" should be "remote servers"? > > > + curlevel = GetCurrentTransactionNestLevel(); > + snprintf(sql, sizeof(sql), "RELEASE SAVEPOINT s%d", curlevel); > > Why does pgfdw_finish_pre_subcommit_cleanup() need to call > GetCurrentTransactionNestLevel() and construct the "RELEASE SAVEPOINT" > query string again? pgfdw_subxact_callback() already does them and > probably we can make it pass either of them to > pgfdw_finish_pre_subcommit_cleanup() as its argument. > > > + This option controls whether <filename>postgres_fdw</filename> > commits > + remote (sub)transactions opened on a foreign server in a local > + (sub)transaction in parallel when the local (sub)transaction > commits. > > "a foreign server" should be "foreign servers"? > > "in a local (sub)transaction" part seems not to be necessary. > > Regards, > -- David Software Engineer Highgo Software Inc. (Canada) www.highgo.ca
Commits
-
postgres_fdw: Add support for parallel abort.
- 983ec23007bd 16.0 landed
-
Refine the definition of page-level freezing.
- b37a08323964 16.0 cited
-
postgres_fdw: Update comments in make_new_connection().
- 4036bcbbb928 15.0 landed
-
postgres_fdw: Minor cleanup for pgfdw_abort_cleanup().
- 56566835039a 15.0 landed
-
postgres_fdw: Add support for parallel commit.
- 04e706d4238f 15.0 landed
-
Fix ruleutils.c's dumping of whole-row Vars in more contexts.
- 43c2175121c8 15.0 cited
-
postgres_fdw: Refactor transaction rollback code to avoid code duplication.
- 85c69611288f 15.0 cited