RE: partition pruning only works for select but update

2022-07-01 Thread James Pang (chaolpan)
l-performance@lists.postgresql.org Subject: Re: partition pruning only works for select but update Justin Pryzby writes: > On Fri, Jul 01, 2022 at 08:30:40AM +, James Pang (chaolpan) wrote: >> We have other application depend on V13, possible to backport code >> changes to V13 as >> ht

Re: partition pruning only works for select but update

2022-07-01 Thread Tom Lane
Justin Pryzby writes: > On Fri, Jul 01, 2022 at 08:30:40AM +, James Pang (chaolpan) wrote: >> 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 > I

Re: partition pruning only works for select but update

2022-07-01 Thread Justin Pryzby
> Sent: Tuesday, June 28, 2022 9:30 PM > To: James Pang (chaolpan) > Cc: pgsql-performance@lists.postgresql.org > Subject: Re: partition pruning only works for select but update > > "James Pang (chaolpan)" writes: > > But when > > Explain update tab

RE: partition pruning only works for select but update

2022-07-01 Thread James Pang (chaolpan)
Pang (chaolpan) Cc: pgsql-performance@lists.postgresql.org Subject: Re: partition pruning only works for select but update "James Pang (chaolpan)" writes: > But when > Explain update table set .. where partitionkey between to_timestamp() and > to_timestamp(); >

RE: partition pruning only works for select but update

2022-06-28 Thread James Pang (chaolpan)
Pang (chaolpan) Cc: pgsql-performance@lists.postgresql.org Subject: Re: partition pruning only works for select but update "James Pang (chaolpan)" writes: > But when > Explain update table set .. where partitionkey between to_timestamp() and > to_timestamp(); > It still

Re: partition pruning only works for select but update

2022-06-28 Thread Tom Lane
"James Pang (chaolpan)" 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.