Re: Parallel copy
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Ashutosh Sharma <ashu.coek88@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, "Hou,
Zhijie" <houzj.fnst@cn.fujitsu.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Rafia Sabih <rafia.pghackers@gmail.com>, Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, Ants Aasma <ants@cybertec.at>, Tomas Vondra <tomas.vondra@2ndquadrant.com>,
Alastair Turner <minion@decodable.me>, Thomas Munro <thomas.munro@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-10-27T15:37:02Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow WaitLatch() to be used without a latch.
- 733fa9aa51c5 14.0 cited
-
Add %P to log_line_prefix for parallel group leader
- b8fdee7d0ca8 14.0 cited
-
Include replication origins in SQL functions for commit timestamp
- b1e48bbe64a4 14.0 cited
-
Avoid useless buffer allocations during binary COPY FROM.
- cd22d3cdb9bd 14.0 cited
On Fri, Oct 23, 2020 at 6:58 PM Ashutosh Sharma <ashu.coek88@gmail.com> wrote: > > > > > I think, if possible, all these if-else checks in CopyFrom() can be > > moved to a single function which can probably be named as > > IdentifyCopyInsertMethod() and this function can be called in > > IsParallelCopyAllowed(). This will ensure that in case of Parallel > > Copy when the leader has performed all these checks, the worker won't > > do it again. I also feel that it will make the code look a bit > > cleaner. > > > > Just rewriting above comment to make it a bit more clear: > > I think, if possible, all these if-else checks in CopyFrom() should be > moved to a separate function which can probably be named as > IdentifyCopyInsertMethod() and this function called from > IsParallelCopyAllowed() and CopyFrom() functions. It will only be > called from CopyFrom() when IsParallelCopy() returns false. This will > ensure that in case of Parallel Copy if the leader has performed all > these checks, the worker won't do it again. I also feel that having a > separate function containing all these checks will make the code look > a bit cleaner. > In the recent patch posted we have changed it to simplify the check for parallel copy, it is not an exact match. I feel this comment is not applicable on the latest patch Regards, Vignesh EnterpriseDB: http://www.enterprisedb.com