Re: pg11.1: dsa_area could not attach to segment - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: pg11.1: dsa_area could not attach to segment
Date
Msg-id 20190214162010.GM30291@telsasoft.com
Whole thread Raw
In response to Re: pg11.1: dsa_area could not attach to segment  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: pg11.1: dsa_area could not attach to segment
List pgsql-hackers
On Fri, Feb 15, 2019 at 01:12:35AM +1300, Thomas Munro wrote:
> The problem is that a DSM handle (ie a random number) can be reused
> for a new segment immediately after the shared memory object has been
> destroyed but before the DSM slot has been released.  Now two DSM
> slots have the same handle, and dsm_attach() can be confused by the
> old segment and give up.
> 
> Here's a draft patch to fix that.  It also clears the handle in a case
> where it wasn't previously cleared, but that wasn't strictly
> necessary.  It just made debugging less confusing.

Thanks.

Do you think that plausibly explains and resolves symptoms of bug#15585, too?

Justin


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: WAL insert delay settings
Next
From: Sergei Kornilov
Date:
Subject: Re: pg11.1: dsa_area could not attach to segment