Re: Allow batched insert during cross-partition updates
Amit Langote <amitlangote09@gmail.com>
From: Amit Langote <amitlangote09@gmail.com>
To: Georgios <gkokolatos@protonmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>, Tomas Vondra <tomas.vondra@enterprisedb.com>, "Tsunakawa, Takayuki" <tsunakawa.takay@fujitsu.com>
Date: 2021-03-11T08:42:43Z
Lists: pgsql-hackers
Hi Georgios, On Wed, Mar 10, 2021 at 9:30 PM Georgios <gkokolatos@protonmail.com> wrote: > I continued looking a bit at the patch, yet I am either failing to see fix or I am > looking at the wrong thing. Please find attached a small repro of what my expectetions > were. > > As you can see in the repro, I would expect the > UPDATE local_root_remote_partitions SET a = 2; > to move the tuples to remote_partition_2 on the same transaction. > However this is not the case, with or without the patch. > > Is my expectation of this patch wrong? I think yes. We currently don't have the feature you are looking for -- moving tuples from one remote partition to another remote partition. This patch is not for adding that feature. What we do support however is moving rows from a local partition to a remote partition and that involves performing an INSERT on the latter. This patch is for teaching those INSERTs to use batched mode if allowed, which is currently prohibited. So with this patch, if an UPDATE moves 10 rows from a local partition to a remote partition, then they will be inserted with a single INSERT command containing all 10 rows, instead of 10 separate INSERT commands. -- Amit Langote EDB: http://www.enterprisedb.com
Commits
-
Allow batching of inserts during cross-partition updates.
- 594f8d3776af 16.0 landed
-
Fix handling of pending inserts in nodeModifyTable.c.
- ffbb7e65a873 16.0 cited
-
Postpone some stuff out of ExecInitModifyTable.
- c5b7ba4e67ae 14.0 cited
-
Fix tuple routing to initialize batching only for inserts
- 927f453a9410 14.0 cited