Re: [PATCH] Disable bgworkers during servers start in pg_upgrade

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Denis Laxalde <denis(dot)laxalde(at)dalibo(dot)com>, Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Disable bgworkers during servers start in pg_upgrade
Date: 2021-08-27 01:34:24
Message-ID: CAOBaU_ZJ1_MAV-2Lv4wu6+PPVbo=O_sC8r9ck_dB_QbGXWs+Zg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 27, 2021 at 7:31 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> Indeed, there is some history here with autovacuum. I have not been
> careful enough to check that. Still, putting a check on
> IsBinaryUpgrade in bgworker_should_start_now() would mean that we
> still keep track of the set of bgworkers registered in shared memory.

That shouldn't lead to any problem right?

> Wouldn't it be better to block things at the source, as of
> RegisterBackgroundWorker()? And that would keep track of the control
> we have on bgworkers in a single place. I also think that we'd better
> document something about that either in bgworker.sgml or pg_upgrade's
> page.

I'm fine with that approach too.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2021-08-27 01:42:35 Re: amcheck/verify_heapam doesn't check for interrupts
Previous Message Julien Rouhaud 2021-08-27 00:59:13 Re: Mark all GUC variable as PGDLLIMPORT