On Wed, Jun 21, 2017 at 7:07 PM, Dilip Kumar <dilipbal...@gmail.com> wrote:
> On Wed, Jun 21, 2017 at 6:50 PM, Kuntal Ghosh
> <kuntalghosh.2...@gmail.com> wrote:
>> I think we can just check dsm_find_mapping() to check whether the dsm
>> handle is already attached. Something like,
>>
>>         }
>> -       else
>> +       else if(!dsm_find_mapping(AutoVacuumShmem->av_dsa_handle))
>>         {
>>                 AutoVacuumDSA = dsa_attach(AutoVacuumShmem->av_dsa_handle);
>>                 dsa_pin_mapping(AutoVacuumDSA);
>>
>> Thoughts?
>
> IMHO, It's not a good idea to use DSM call to verify the DSA handle.
>
Okay. Is there any particular scenario you've in mind where this may fail?



-- 
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to