On Wed, May 12, 2021 at 6:47 AM Alvaro Herrera <alvhe...@alvh.no-ip.org> wrote: > On 2021-May-11, Bruce Momjian wrote: > > > > 86dc90056d Rework planning and execution of UPDATE and DELETE. > > > a1115fa078 Postpone some more stuff out of ExecInitModifyTable. > > > c5b7ba4e67 Postpone some stuff out of ExecInitModifyTable. > > Are these the set that means UPDATE/DELETE can now do partition pruning? > I think that's a significant improvement, because table partitioning > becomes usable in situations where it previously wasn't, so let's > mention it.
Thanks. To be clear, update/delete can now do *run-time* partition pruning, while plan-time pruning has already been working since v12 (commit 428b260f87). How? The plan for update/delete now looks very similar to that for an equivalent select query -- Append/MergeAppend to scan partitions, with ModifyTable on top to do the actual update/delete -- and because Append/MergeAppend nodes carry run-time pruning info, update/delete now get that ability. -- Amit Langote EDB: http://www.enterprisedb.com