Re: Parallel copy
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-10-27T15:22:07Z
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 Wed, Oct 21, 2020 at 3:50 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Wed, Oct 21, 2020 at 3:19 PM Bharath Rupireddy > <bharath.rupireddyforpostgres@gmail.com> wrote: > > > > > > 9. Instead of calling CopyStringToSharedMemory() for each string > > variable, can't we just create a linked list of all the strings that > > need to be copied into shm and call CopyStringToSharedMemory() only > > once? We could avoid 5 function calls? > > > > If we want to avoid different function calls then can't we just store > all these strings in a local structure and use it? That might improve > the other parts of code as well where we are using these as individual > parameters. > I have made one structure SerializedListToStrCState to store all the variables. The rest of the common variables is directly copied from & into cstate. > > 10. Similar to above comment: can we fill all the required > > cstate->variables inside the function CopyNodeFromSharedMemory() and > > call it only once? In each worker we could save overhead of 5 function > > calls. > > > > Yeah, that makes sense. > I feel keeping it this way makes the code more readable, and also this is not in a performance intensive tight loop. I'm retaining the change as is unless we feel this will make an impact. This is addressed in v9 patch shared at [1]. [1] - https://www.postgresql.org/message-id/CALDaNm1cAONkFDN6K72DSiRpgqNGvwxQL7TjEiHZ58opnp9VoA@mail.gmail.com Regards, Vignesh EnterpriseDB: http://www.enterprisedb.com