Re: BackendPidGetProc doesn't return PGPROC for background worker? - Mailing list pgsql-hackers

From Amit Langote
Subject Re: BackendPidGetProc doesn't return PGPROC for background worker?
Date
Msg-id 5555845F.2020906@lab.ntt.co.jp
Whole thread Raw
In response to Re: BackendPidGetProc doesn't return PGPROC for background worker?  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On 2015-05-15 PM 02:13, Pavel Stehule wrote:
> 2015-05-15 3:39 GMT+02:00 Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>:
>> 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
> 

See my other (the last) email. You said you created a bgworker from bgworker,
so if the parent bgworker did not perform
BackgroundWorkerInitializeConnection, then it would not be found in ProcArray.

Thanks,
Amit




pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: contrib module - generic command scheduler
Next
From: Ashutosh Bapat
Date:
Subject: Re: upper planner path-ification