Thomas Munro wrote:
> + if (CurrentResourceOwner)
> + {
> + seg->resowner = CurrentResourceOwner;
> + ResourceOwnerRememberDSM(CurrentResourceOwner, seg);
> + }
>
> You need to assign seg->resowner = CurrentResourceOwner
> unconditionally here. Otherwise seg->resowner is uninit
Thomas Munro wrote:
> I'd word this slightly differently:
>
> + * If there is a CurrentResourceOwner, the new segment is born unpinned and
> the
> + * resource owner is in charge of destroying it (and will be blamed if it
> + * doesn't). If there's no current resource owner, then the segment st
On Sat, Mar 25, 2017 at 1:59 PM, Thomas Munro
wrote:
> On Sat, Mar 25, 2017 at 12:35 PM, Alvaro Herrera
> wrote:
>> Alvaro Herrera wrote:
>>> Per
>>> https://postgr.es/m/CAEepm=11ma_Z1HoPxPcSCANnh5ykHORa=hca1u1v1+5s_jw...@mail.gmail.com
>>> it seems that the dsm.c API is a bit inconvenient right
On Sat, Mar 25, 2017 at 12:35 PM, Alvaro Herrera
wrote:
> Alvaro Herrera wrote:
>> Per
>> https://postgr.es/m/CAEepm=11ma_Z1HoPxPcSCANnh5ykHORa=hca1u1v1+5s_jw...@mail.gmail.com
>> it seems that the dsm.c API is a bit inconvenient right now. I proposed
>> in the first patch in that thread to chang
Alvaro Herrera wrote:
> Per
> https://postgr.es/m/CAEepm=11ma_Z1HoPxPcSCANnh5ykHORa=hca1u1v1+5s_jw...@mail.gmail.com
> it seems that the dsm.c API is a bit inconvenient right now. I proposed
> in the first patch in that thread to change the API so that a segment is
> marked as "pinned" if created