Re: DSA failed to allocate memory
Dongming Liu <ldming101@gmail.com>
From: Dongming Liu <ldming101@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-04-06T07:10:39Z
Lists: pgsql-hackers
Attachments
- 0001-Re-bin-segment-when-dsa-memory-is-freed-v2.patch (application/octet-stream) patch v2-0001
- 0002-port-test_dsa-v2.patch (application/octet-stream) patch v2-0002
On Mon, Mar 28, 2022 at 3:53 PM Thomas Munro <thomas.munro@gmail.com> wrote: > Hi Dongming, > > Thanks for the report, and for working on the fix. Can you please > create a commitfest entry (if you haven't already)? I plan to look at > this soon, after the code freeze. I created a commitfest entry https://commitfest.postgresql.org/38/3607/. Thanks for your review. Are you proposing that the test_dsa module should be added to the > tree? If so, some trivial observations: "#ifndef > HAVE_INT64_TIMESTAMP" isn't needed anymore (see commit b6aa17e0, which > is in all supported branches), the year should be updated, and we use > size_t instead of Size in new code. > Yes, I think test_dsa is very helpful and necessary to develop dsa related features. I have removed the HAVE_INT64_TIMESTAMP related code. Most of the code for test_dsa comes from your patch[1] and I add some test cases. In addition, I add a few OOM test cases that allocate a fixed size of memory until the memory overflows, run it twice and compare the amount of memory they allocate. These cases will fail on the current master branch. [1] https://www.postgresql.org/message-id/CAEepm%3D3U7%2BRo7%3DECeQuAZoeFXs8iDVX56NXGCV7z3%3D%2BH%2BWd0Sw%40mail.gmail.com -- Best Regards, Dongming
Commits
-
Re-bin segment when memory pages are freed.
- 1605623ec686 11.21 landed
- 74ad9b0d1e7c 12.16 landed
- a0003572f214 13.12 landed
- b7ec66731dd8 14.9 landed
- 9ffb10f183f1 15.4 landed
- af8f9ec66bd1 16.0 landed
- 03f80daac8cf 17.0 landed
-
De-support floating-point timestamps.
- b6aa17e0ae36 10.0 cited