Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJG2l-0005mn-VI for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Aug 2021 14:07:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mJG2k-0000V4-EM for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Aug 2021 14:07:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJG2k-0000Uu-4U for pgsql-hackers@lists.postgresql.org; Thu, 26 Aug 2021 14:07:46 +0000 Received: from mail1.dalibo.net ([212.83.143.11] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJG2h-0001iD-FM for pgsql-hackers@lists.postgresql.org; Thu, 26 Aug 2021 14:07:45 +0000 Received: from [192.168.0.29] (unknown [88.165.191.216]) by mail.dalibo.com (Postfix) with ESMTPSA id 1A98320505; Thu, 26 Aug 2021 16:07:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1629986861; bh=xlDNLlQksD/CwVcs9QLChCK9UVqOPxp2l6DHmPBZI/k=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=gUQV6Y+OuDOxD4zXgigseK+iMqWQgMZJPa9VvYTsQgX7CpdugtuK697DkIjEy+6t1 4BsDsG7RMIeeL3q2LdQ3iNPcd0Ez+EzlrO98hkU70pFkRsJvF20vLhXzZ8cy7Rj5tK WeNoifoOhjt8rxXatGI8wJ3xxdxTbBUoliC/l5qc= Subject: Re: [PATCH] Disable bgworkers during servers start in pg_upgrade To: Bruce Momjian , Daniel Gustafsson Cc: Julien Rouhaud , Michael Paquier , Jehan-Guillaume de Rorthais , Andres Freund , PostgreSQL Hackers References: <20210124003611.lkyxhd2mpdmv5xzh@alap3.anarazel.de> <20210127102511.tvhu2wmrxoz3tle4@dalibo.com> <20210127144132.215fe4bb@firost> <20210312082325.weltivlokfpc3gt2@nol> <7d470953-07cb-f9dc-f7b3-d33697644b54@dalibo.com> <20210826130945.GB22637@momjian.us> <2CD2F784-E80C-4B0D-A038-A0D44DD4EDC4@yesql.se> <20210826134229.GC22637@momjian.us> From: Denis Laxalde Message-ID: <71b7869f-af55-ae33-afba-cfd4de35b944@dalibo.com> Date: Thu, 26 Aug 2021 16:07:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210826134229.GC22637@momjian.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bruce Momjian a écrit : > On Thu, Aug 26, 2021 at 03:38:23PM +0200, Daniel Gustafsson wrote: >>> On 26 Aug 2021, at 15:09, Bruce Momjian wrote: >>> On Thu, Aug 26, 2021 at 03:24:33PM +0800, Julien Rouhaud wrote: >>>> .. I still think that >>>> changing bgworker_should_start_now() is a better option. >>> I am not sure. We have a lot of pg_upgrade code that turns off things >>> like autovacuum and that has worked fine: >> True, but there are also conditionals on IsBinaryUpgrade for starting the >> autovacuum launcher in the postmaster, so there is some precedent. > Oh, I was not aware of that. > If I understand correctly, autovacuum is turned off by pg_upgrade code only if the old cluster does not support the -b flag (prior to 9.1 apparently). Otherwise, this is indeed handled by IsBinaryUpgrade.