Re: EXEC_BACKEND vs bgworkers without BGWORKER_SHMEM_ACCESS

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2021-08-02T15:49:59Z
Lists: pgsql-hackers
Hi,

On 2021-08-02 11:00:49 -0400, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > If you're saying that this code has been 100% broken for 7 years and
> > nobody's noticed until now, then that suggests that nobody actually
> > uses non-shmem-connected bgworkers. I sort of hate to give up on that
> > concept but if we've really gone that many years without anyone
> > noticing obvious breakage then maybe we should.
> 
> Well, the problem only exists on Windows so maybe this indeed
> escaped notice.

Right. I did briefly look around and I didn't find bgworkers without
shmem attachement...


> Still, this is good evidence that the case isn't used *much*, and TBH
> I don't see many applications for it.  I can't say I'm excited about
> putting effort into fixing it.

Yea, I don't think it adds that much - without e.g. sharing a file
descriptor with the unconnected bgworker one can't implement something
like syslogger.

Greetings,

Andres Freund



Commits

  1. Remove support for background workers without BGWORKER_SHMEM_ACCESS.

  2. Detach shared memory from bgworkers without shmem access.