Re: When Update balloons memory
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Klaudie Willis <Klaudie.Willis@protonmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-01-11T19:45:19Z
Lists: pgsql-bugs, pgsql-general
Attachments
- v1-0001-Fix-memory-leak-in-indexUnchanged-hint-mechanism.patch (application/octet-stream) patch v1-0001
On Tue, Dec 14, 2021 at 11:33 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > I'd be inclined to do so if we can find a suitable place to put it. > But wouldn't a field in IndexInfo serve? Letting the field default > to "not optimizable" would cover most cases. Attached draft HEAD-only bugfix adds two new bool fields to IndexInfo. The first bool indicates if we've already done the required work for this IndexInfo. The second field is used as a cache (if the cache is set the first bool is 'true'). These two fields fit in existing alignment padding, so the marginal space overhead is zero. I'll probably need to greatly simplify the code for backpatch, to avoid an ABI break. Seems fine to teach index_unchanged_by_update to return "true" unconditionally, given how the IndexUnchanged hint is currently applied. I haven't made the code use pull_varnos(), which you suggested back in December. It looks like it would be tricky to do that from the executor, since pull_varnos() has a PlannerInfo* argument. That has been the case since your commit 55dc86eca7 from January 2021, "Fix pull_varnos' miscomputation of relids set for a PlaceHolderVar". Please advise. -- Peter Geoghegan
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix memory leak in indexUnchanged hint mechanism.
- db6736c93cb8 15.0 landed
- 41ee68a91f0f 14.2 landed
-
Fix pull_varnos' miscomputation of relids set for a PlaceHolderVar.
- 55dc86eca70b 14.0 cited