Re: [HACKERS] making bgworkers without shmem access actually not have shmem access

2014-05-07 Thread Petr Jelinek
On 07/05/14 20:37, Robert Haas wrote: At a minimum, it's got to be better than the status quo, where shared memory is accessible throughout the entire lifetime of non-shmem-access background workers. Seems reasonable to me, it might need to be revisited to at least try to figure out if we can

Re: [HACKERS] making bgworkers without shmem access actually not have shmem access

2014-05-07 Thread Robert Haas
On Wed, May 7, 2014 at 2:44 PM, Tom Lane wrote: > Robert Haas writes: >> I've complained about this problem a few times before: there's nothing >> to prevent a background worker which doesn't request shared memory >> access from calling InitProcess() and then accessing shared memory >> anyway. T

Re: [HACKERS] making bgworkers without shmem access actually not have shmem access

2014-05-07 Thread Tom Lane
Robert Haas writes: > I've complained about this problem a few times before: there's nothing > to prevent a background worker which doesn't request shared memory > access from calling InitProcess() and then accessing shared memory > anyway. The attached patch is a first crack at fixing it. > Com

[HACKERS] making bgworkers without shmem access actually not have shmem access

2014-05-07 Thread Robert Haas
I've complained about this problem a few times before: there's nothing to prevent a background worker which doesn't request shared memory access from calling InitProcess() and then accessing shared memory anyway. The attached patch is a first crack at fixing it. Unfortunately, there's still a wind