From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, r(dot)zharkov(at)postgrespro(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #16914: Regression test of the worker_spi fails if USE_MODULE_DB environment variable is set. |
Date: | 2021-03-05 06:19:26 |
Message-ID: | YEHNbqufuVecA9IS@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Mar 05, 2021 at 12:42:43AM -0500, Tom Lane wrote:
> Yeah, the fact that bgw_main_arg is declared as Datum is really kind
> of a lie, because the only thing that actually works there is a pass
> by value datatype (not that our docs tell you so).
Exactly.
> We could stuff the database name into bgw_extra perhaps, but that
> seems restrictive as well. I wonder if there's a reasonable way to
> pass over a struct of caller-defined size.
Or we could just rely on a custom memory context that dynamic workers
could use to store their data? It could be simpler IMO to just merge
together bgw_main_arg and bgw_extra, then pass down the whole as an
argument of the main routine of the bgworker, say with a buffer of 256
bytes for example. I am not sure that workers really need that much
for themselves at startup out of GUCs, but I may be wrong :)
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | David Steele | 2021-03-05 12:55:43 | Re: BUG #16894: PANIC: WAL contains references to invalid pages |
Previous Message | Tom Lane | 2021-03-05 05:42:43 | Re: BUG #16914: Regression test of the worker_spi fails if USE_MODULE_DB environment variable is set. |