Re: dsm.c API tweak - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: dsm.c API tweak
Date
Msg-id 20170328224805.yfto4pbbvbt46ab5@alvherre.pgsql
Whole thread Raw
List pgsql-hackers
Thomas Munro wrote:

> +   if (CurrentResourceOwner)
> +   {
> +       seg->resowner = CurrentResourceOwner;
> +       ResourceOwnerRememberDSM(CurrentResourceOwner, seg);
> +   }
> 
> You need to assign seg->resowner = CurrentResourceOwner
> unconditionally here.  Otherwise seg->resowner is uninitialised junk.

Thanks for that.  Pushed, with the comments as I suggested in my other
reply.  If you think they merit more wordsmithing, feel free to suggest
something.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Patch: Write Amplification Reduction Method (WARM)
Next
From: Petr Jelinek
Date:
Subject: Re: logical replication launcher crash on buildfarm