| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> | 
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> | 
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: EXEC_BACKEND vs bgworkers without BGWORKER_SHMEM_ACCESS | 
| Date: | 2021-08-02 19:12:49 | 
| Message-ID: | 202108021912.26krakgw7yfv@alvherre.pgsql | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On 2021-Aug-02, Andres Freund wrote:
> > When I included this case I was thinking in tasks which would just run
> > stuff not directly connected to data.  Something like a sub-daemon: say
> > a connection pooler, which is a bgworker just so that it starts and
> > stops together with postmaster, and share facilities like GUC
> > configuration and SIGHUP handling, etc.
> 
> I think nearly all such cases are going to want some monitoring from
> within the database - which then needs shared memory.
True.  Observability for such things is critical (pgbouncer goes quite
some trouble to offer SQL-queryable views into its metrics), which kills
the argument.
> I do think there's some potential gains in simplicity and robustness
> that are made mildly harder by a subprocess that first attaches and
> detaches from shm (it's the only case where we can't easily unify the
> place InitProcess() is called between EB and ! EB right now). There's
> several ways that could be tackled. Removing the need to have that if
> obviously one of them.
Hmm, I don't remember that an shmem-unconnected bgworker first connected
to it and then let go.  It seems weird to do it that way.  My intention,
as far as I recall, is that they would just never connect to shmem,
period.
-- 
Álvaro Herrera           39°49'30"S 73°17'W  —  https://www.EnterpriseDB.com/
"I think my standards have lowered enough that now I think 'good design'
is when the page doesn't irritate the living f*ck out of me." (JWZ)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2021-08-02 19:17:28 | Re: EXEC_BACKEND vs bgworkers without BGWORKER_SHMEM_ACCESS | 
| Previous Message | Andres Freund | 2021-08-02 18:40:28 | Re: EXEC_BACKEND vs bgworkers without BGWORKER_SHMEM_ACCESS |