Re: BackendPidGetProc doesn't return PGPROC for background worker?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BackendPidGetProc doesn't return PGPROC for background worker?
Date: 2015-05-15 05:13:42
Message-ID: CAFj8pRCb7fcKvC=VOvcsbYonB3PjtMo57z+hJVinLJZqqGWRGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-05-15 3:39 GMT+02:00 Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>:

> On 2015-05-15 AM 05:01, Pavel Stehule wrote:
> >
> > I am trying to start bgworker from bgworker and create communication
> > between these process. I have a code based on test_shm_mq. This code
> fails
> > because BackendPidGetProc doesn't find related bgworker process, although
> > the registrant process is living
> >
>
> One reason for this may be that the worker was not started with the flag
> BGWORKER_SHMEM_ACCESS which is necessary to perform InitProcess() that
> would
> initialize a PGPROC entry for it. But if you'd used the same method for
> initializing workers as test_shm_mq_setup(), then it should have.
>

I have it

>
> Thanks,
> Amit
>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-05-15 05:18:03 Re: proposal: contrib module - generic command scheduler
Previous Message Haribabu Kommi 2015-05-15 05:03:35 Re: Providing catalog view to pg_hba.conf file - Patch submission