Re: Parallel copy
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Ants Aasma <ants@cybertec.at>, vignesh C <vignesh21@gmail.com>, 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-06-03T16:13:14Z
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 Mon, May 18, 2020 at 12:48 AM Amit Kapila <amit.kapila16@gmail.com> wrote: > In the above case, even though we are executing a single command from > the user perspective, but the currentCommandId will be four after the > command. One increment will be for the copy command and the other > three increments are for locking tuple in PK table > (tab_fk_referenced_chk) for three tuples in FK table > (tab_fk_referencing_chk). Now, for parallel workers, it is > (theoretically) possible that the three tuples are processed by three > different workers which don't get synced as of now. The question was > do we see any kind of problem with this and if so can we just sync it > up at the end of parallelism. I strongly disagree with the idea of "just sync(ing) it up at the end of parallelism". That seems like a completely unprincipled approach to the problem. Either the command counter increment is important or it's not. If it's not important, maybe we can arrange to skip it in the first place. If it is important, then it's probably not OK for each backend to be doing it separately. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company