Re: DSA failed to allocate memory

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dongming Liu <ldming101(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DSA failed to allocate memory
Date: 2023-06-14 00:29:54
Message-ID: CA+hUKGKMsNg55OqAWy-p8+T+bf1UK2CeLgyG0jFtTVnaaEh0qw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 20, 2023 at 5:52 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> I'm wondering about this bit in rebin_segment():
>
> + if (segment_map->header == NULL)
> + return;
>
> Why would we be rebinning an uninitialised/unused segment?

Answering my own question: because destroy_superblock() can do that.
So I think destroy_superblock() should test for that case, not
rebin_segment(). See attached.

Attachment Content-Type Size
v4-0001-Re-bin-segment-when-memory-pages-are-freed.patch text/x-patch 4.6 KB
v4-0002-Add-a-test-module-to-exercise-dsa.c.patch text/x-patch 19.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2023-06-14 00:58:37 Re: Inconsistent results with libc sorting on Windows
Previous Message Michael Paquier 2023-06-14 00:19:39 Re: Fix a typo in md.c