Re: DSA failed to allocate memory - Mailing list pgsql-hackers

From Dongming Liu
Subject Re: DSA failed to allocate memory
Date
Msg-id CAL1p7e8uGMfyc1f=49z-Feto5YD5F0eqwDQYpdmr_7ncfsoMoA@mail.gmail.com
Whole thread Raw
In response to Re: DSA failed to allocate memory  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
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.

Attachment

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Defer selection of asynchronous subplans until the executor initialization stage
Next
From: Amit Langote
Date:
Subject: Re: generic plans and "initial" pruning