| From: | Daniil Davydov <3danissimo(at)gmail(dot)com> |
|---|---|
| To: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Proposal : Use bump memory context for temp buffers |
| Date: | 2025-12-16 13:05:38 |
| Message-ID: | CAJDiXghUJFHv3BJoKqWwbm5WTRK4kWNTp30hJpq7P5jz2t53MA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
Commit [1] introduced a new memory context suitable for situations when we
should allocate a large amount of memory with no need to free or reallocate it.
I think that it will be useful for temp buffers :
1) We allocate them lazily and never try to free them.
2) Some users are very active in working with temporary tables, and as
a result,
they set large values for the "temp_buffers" parameter (several gigabytes).
Thus, the use case for temp buffers seems to perfectly fit for bump
memory context.
What do you think?
[1] 29f6a959cfd8ffa7d6db2c0629439c5329e2853e
--
Best regards,
Daniil Davydov
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Use-bump-memcxt-for-temp-buffers.patch | text/x-patch | 1004 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Anthonin Bonnefoy | 2025-12-16 13:07:58 | Fix possible 'unexpected data beyond EOF' on replica restart |
| Previous Message | Amul Sul | 2025-12-16 13:00:23 | Re: Error position support for ComputeIndexAttrs |