Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag
Date: 2023-10-16 02:22:38
Message-ID: ZSyebsiub88pyJJO@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 12, 2023 at 07:42:28AM +0200, Drouvot, Bertrand wrote:
> On 10/12/23 2:26 AM, Michael Paquier wrote:
>> I have tweaked a few comments, and applied that. Thanks.
>
> Oh and you also closed the CF entry, thanks!

The buildfarm has provided some feedback, and the new tests have been
unstable on mamba:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mamba&dt=2023-10-15%2005%3A04%3A21

In more details:
# poll_query_until timed out executing this query:
# SELECT datname, usename, wait_event FROM pg_stat_activity
# WHERE backend_type = 'worker_spi dynamic' AND
# pid = ;
# expecting this output:
# mydb|nologrole|WorkerSpiMain
# last actual query output:
#
# with stderr:
# ERROR: syntax error at or near ";"
# LINE 3: pid = ;

So this looks like a hard failure in starting the worker that should
bypass the role login check. The logs don't offer much information,
but I think I know what's going on here: at this stage of the tests,
the number of workers created is 7, very close to the limit of
max_worker_processes, at 8 by default. So one parallel worker spawned
by any of the other bgworkers would be enough to prevent the last one
to start, and mamba has been slow enough in the startup of the static
workers to show that this could be possible.

I think that we should just bump up max_worker_processes, like in the
attached.
--
Michael

Attachment Content-Type Size
worker-spi-guc.patch text/x-diff 760 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-10-16 02:47:22 Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag
Previous Message Michael Paquier 2023-10-16 01:58:03 Re: Add support for AT LOCAL