Re: EXEC_BACKEND vs bgworkers without BGWORKER_SHMEM_ACCESS - Mailing list pgsql-hackers

From Andres Freund
Subject Re: EXEC_BACKEND vs bgworkers without BGWORKER_SHMEM_ACCESS
Date
Msg-id 20210805230902.erwpnjuvykiasjxx@alap3.anarazel.de
Whole thread Raw
In response to Re: EXEC_BACKEND vs bgworkers without BGWORKER_SHMEM_ACCESS  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: EXEC_BACKEND vs bgworkers without BGWORKER_SHMEM_ACCESS  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 2021-08-02 15:34:07 -0400, Alvaro Herrera wrote:
> Ah, that makes sense.  That doesn't sound super fragile, but it is odd
> and it's probably a good argument for removing the feature, particularly
> since nobody seems to be using it.

ISTM we concluded that we should remove unconnected workers. Writing a patch
to do so left me with two questions:

First, what do we want to do with BGWORKER_SHMEM_ACCESS? I'm inclined to treat
it as a required flag going forward. That way we don't silently start being
attached to shared memory in case somebody actually has a unattached
worker. And if we ever wanted to add the ability to have unattached workers
back, it'll also be easier this way.  Perhaps it also has a small amount of
signalling value reminding people that they need to be careful...

The second question is what we want to do in the backbranches. I think the
reasonable options are to do nothing, or to make !BGWORKER_SHMEM_ACCESS an
error in SanityCheckBackgroundWorker() if EXEC_BACKEND is used.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: Accidentally dropped constraints: bug?
Next
From: Tom Lane
Date:
Subject: Re: Assert triggered during RE_compile_and_cache