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 1p5X24-0008Ko-Aq for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 19:03:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p5X23-0006R3-62 for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 19:03:07 +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 1p5X22-0006Qr-SA for pgsql-hackers@lists.postgresql.org; Wed, 14 Dec 2022 19:03:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5X20-00080i-Lg for pgsql-hackers@postgresql.org; Wed, 14 Dec 2022 19:03:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2BEJ2w7v2787772; Wed, 14 Dec 2022 14:02:58 -0500 From: Tom Lane To: Nathan Bossart cc: Melih Mutlu , Thomas Munro , "Hayato Kuroda (Fujitsu)" , "pgsql-hackers@postgresql.org" Subject: Re: wake up logical workers after ALTER SUBSCRIPTION In-reply-to: <20221214183759.GC773264@nathanxps13> References: <20221207181145.GA3698731@nathanxps13> <2550453.1670974328@sss.pgh.pa.us> <20221214000145.GA638663@nathanxps13> <2561155.1670977214@sss.pgh.pa.us> <20221214004105.GA669835@nathanxps13> <20221214171023.GA689106@nathanxps13> <2707695.1671039752@sss.pgh.pa.us> <20221214174535.GA773264@nathanxps13> <2783450.1671042198@sss.pgh.pa.us> <20221214183759.GC773264@nathanxps13> Comments: In-reply-to Nathan Bossart message dated "Wed, 14 Dec 2022 10:37:59 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2787770.1671044578.1@sss.pgh.pa.us> Date: Wed, 14 Dec 2022 14:02:58 -0500 Message-ID: <2787771.1671044578@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > On Wed, Dec 14, 2022 at 01:23:18PM -0500, Tom Lane wrote: >> Oh. What in the world is the rationale for that? > My assumption is that this is meant to avoid starting workers as fast as > possible if they repeatedly crash. I can see the point of rate-limiting if the workers are failing to connect or crashing while trying to process data. But it's not very sane to apply the same policy to an intentional worker exit-for-reconfiguration. Maybe we could have workers that are exiting for that reason set a flag saying "please restart me without delay"? A *real* fix would be to not exit at all, at least for reconfigurations that don't change the connection parameters, but instead cope with recomputing whatever needs recomputed in the workers' state. I can believe that that'd be a lot of work though. regards, tom lane