Re: [HACKERS] Autovacuum launcher occurs error when cancelled by SIGINT - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: [HACKERS] Autovacuum launcher occurs error when cancelled by SIGINT
Date
Msg-id CAFiTN-tZ2E0DcvsWwqpgwAEGQExvAPaV6YHYq+H3RJFd-wEdbQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Autovacuum launcher occurs error when cancelled by SIGINT  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Responses Re: [HACKERS] Autovacuum launcher occurs error when cancelled by SIGINT
List pgsql-hackers
On Wed, Jun 21, 2017 at 6:50 PM, Kuntal Ghosh
<kuntalghosh.2007@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.

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Kuntal Ghosh
Date:
Subject: Re: [HACKERS] Autovacuum launcher occurs error when cancelled by SIGINT
Next
From: Kuntal Ghosh
Date:
Subject: Re: [HACKERS] Incorrect documentation about pg_stat_activity