Re: Should pg 11 use a lot more memory building an spgist index?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Amit Langote <amitlangote09@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>, akorotkov@postgresql.org,
bruno@wolff.to,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-10-31T21:21:29Z
Lists: pgsql-hackers
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes: > Maybe, we don't need to spoil the interface of index_beginscan with the > new memory context argument like my patch does if the simple following of > its contract by amendscan would suffice. Yeah, I'm not enamored of changing the API of index_beginscan for this; the existing convention that it should allocate in CurrentMemoryContext seems perfectly suitable. And changing it would create a lot of code churn, not only for us but for externally-maintained AMs. What is at stake is changing the API of amendscan, to specify that it need not release memory because the current context is expected to be destroyed or reset shortly after ending the scan. Then, for the small number of call sites where that wouldn't be true, it's on those callers to set up a suitable context and switch into it. Note this is actually forwards compatible, in that an AM that's still following the convention of releasing stuff manually would not be broken. regards, tom lane
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 repeated SPGIST index scans.
- 696b0c5fd0a8 12.0 landed
- 95015b1f8e8e 9.4.20 landed
- 92e371f9b143 10.6 landed
- 82dd1c271492 9.3.25 landed
- 558571afc7c4 9.6.11 landed
- 156a737a6b73 9.5.15 landed
- 2493e2c2d167 11.1 landed
-
Add support for nearest-neighbor (KNN) searches to SP-GiST
- 2a6368343ff4 12.0 cited