RE: partition pruning only works for select but update - Mailing list pgsql-performance

From James Pang (chaolpan)
Subject RE: partition pruning only works for select but update
Date
Msg-id PH0PR11MB5191A8D08D5B27D084BC6BFBD6BD9@PH0PR11MB5191.namprd11.prod.outlook.com
Whole thread Raw
In response to RE: partition pruning only works for select but update  ("James Pang (chaolpan)" <chaolpan@cisco.com>)
Responses Re: partition pruning only works for select but update  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-performance
We have other application depend on V13, possible to backport code changes to V13 as
https://git.postgresql.org/gitweb/?p=postgresql.git;a=patch;h=86dc90056dfdbd9d1b891718d2e5614e3e432f35

Thanks,

James

-----Original Message-----
From: Tom Lane <tgl@sss.pgh.pa.us>
Sent: Tuesday, June 28, 2022 9:30 PM
To: James Pang (chaolpan) <chaolpan@cisco.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: partition pruning only works for select but update

"James Pang (chaolpan)" <chaolpan@cisco.com> writes:
> But when
> Explain update table set .. where  partitionkey between  to_timestamp() and to_timestamp();
>   It still show all of partitions with update ...

In releases before v14, partition pruning is far stupider for UPDATE (and DELETE) than it is for SELECT.

            regards, tom lane



pgsql-performance by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Fluctuating performance of updates on small table with trigger
Next
From: Justin Pryzby
Date:
Subject: Re: partition pruning only works for select but update