Re: EXEC_BACKEND vs bgworkers without BGWORKER_SHMEM_ACCESS

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL Development <pgsql-hackers@postgresql.org>
Date: 2021-08-06T00:02:02Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> First, what do we want to do with BGWORKER_SHMEM_ACCESS? I'm inclined to treat
> it as a required flag going forward.

+1

> 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.

I think doing nothing is fine.  Given the lack of complaints, we're
more likely to break something than fix anything useful.

			regards, tom lane



Commits

  1. Remove support for background workers without BGWORKER_SHMEM_ACCESS.

  2. Detach shared memory from bgworkers without shmem access.