Re: Incorrect cost for MergeAppend
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Alexander Kuzmenkov <akuzmenkov@timescale.com>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, David Rowley <dgrowleyml@gmail.com>, pgsql-hackers@postgresql.org
Date: 2024-01-31T13:52:03Z
Lists: pgsql-hackers
On 2024-Jan-31, Alexander Kuzmenkov wrote: > To put it another way, this change enables our usual cost model for > MergeAppend to work correctly in the presence of filters. I think we > can consider this model to be reasonably correct, and we don't > currently have major problems with MergeAppend being chosen instead of > Sort + Append in cases where it's suboptimal, right? So applying it > properly in case with filters is not likely to introduce problems. Since we have a minor coming up very soon, I think it's not a good idea to backpatch right now. Maybe you can push to master now, and consider whether to backpatch later. The problem is -- if somebody has an application that gets good plans with the current cost model, and you change the cost model and the plans become worse, what do they do? If you change this in a major release, this is not an issue because they must test their queries before upgrading and if they fail to realize a problem exists then it's their fault. If you change it in a minor release, then those people will be very upset that things were changed suddenly, and they may get wary of future minor upgrades, which we don't want. Plus, they would need to do careful testing before doing the minor upgrade. Maybe plans can only go from bad to good and never from good to bad. But are we 100% certain that that is the case? People who are **desperate** to get this improvement can perhaps run a patched version in the meantime. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix costing bug in MergeAppend
- 9d1a5354f58c 17.0 landed
-
Fix locking when fixing an incomplete split of a GIN internal page
- 6a1ea02c491d 17.0 cited