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 1p5VpD-00056l-KD for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 17:45:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p5VpB-0004JQ-V5 for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 17:45:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5VpB-0004JH-Lz for pgsql-hackers@lists.postgresql.org; Wed, 14 Dec 2022 17:45:45 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p5Vp5-0003dB-7X for pgsql-hackers@postgresql.org; Wed, 14 Dec 2022 17:45:45 +0000 Received: by mail-pg1-x52f.google.com with SMTP id w37so2477423pga.5 for ; Wed, 14 Dec 2022 09:45:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/02QAS9ZttfY46qPmWb0KMASGQLd8PxIpmUYAEoRrAg=; b=jjtIrrsWFFmrGOuq2rADShQvoK9KvEGVWAmkOQ2F66PqLgX/HIB30+tTDEq58mhFA2 FQFedyaQdkshY3H54TR4U8pkV8V9HA2vF90nYzD2sZk2CAUjsAghXKTkwijw2EkcCIXN 4qYPQygHMNnY+sfaptV+KnJdqQ3cWIOC40m7c3zWKwxo3k0npZxWHZpfaLyhowOws03Y tw4GULwHuIm4OAwyMFG6cIb6kQdQvCFCv9Gx0inJb8fA8yQ1hoOcK7dFBF2MTWOVEniz Ml19F7RzBD2rspyINm6WIv8eWnx9W7+Wt7JfeCQ95ksGX6aiSLUnZbIcHLokDxY3dz5a gcxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/02QAS9ZttfY46qPmWb0KMASGQLd8PxIpmUYAEoRrAg=; b=MZ6BxLYFULVbKnuSZGeV54oBAtMztjzgbi4+QkSUh7KW9B9JDopYg3dBVD4pOKvAOy 5i079fy6OyUdZ2rGjsy0ARjJqPrwFAwWpnro6363S1TzBPlUIveXbrD1X/eA6ljGLLLx MSawiGo3K1g56T3XXVyOjGdYcnrgpX8kOIiMXRvw8SD141NeA5pQC5OrJjGpzKxoxWDB 8zEzaNaILx1dhZABVB8UuvT8djmUBkWhlnc+FwfVS9mnlc5ZXRJGO+g7nN6AcOA632Up IMxFfIg03GICaGmBA4FzMSx9Rielz3CGaAtPs+wP7rCSY6v3JY/8YfSvmMN4aXdgXLwR +Rdg== X-Gm-Message-State: ANoB5pk6/hjCuskOMnd1Tcw944oKl8oz8SFtxJ7SG/rmuMyafS+sQuwY bRucToargCdG9f18QRPBi0M= X-Google-Smtp-Source: AA0mqf4X1FgyJS46z61pnEG6F3nflzDR6RuAuFeSFpEgLBe9Vwr6o/+PTqf3wEc9W2Se514RG0RCQw== X-Received: by 2002:aa7:9243:0:b0:56a:d3ff:f4b2 with SMTP id 3-20020aa79243000000b0056ad3fff4b2mr24461701pfp.10.1671039937461; Wed, 14 Dec 2022 09:45:37 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id g13-20020aa796ad000000b0057726bd7335sm152957pfk.121.2022.12.14.09.45.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 09:45:36 -0800 (PST) Date: Wed, 14 Dec 2022 09:45:35 -0800 From: Nathan Bossart To: Tom Lane Cc: Melih Mutlu , Thomas Munro , "Hayato Kuroda (Fujitsu)" , "pgsql-hackers@postgresql.org" Subject: Re: wake up logical workers after ALTER SUBSCRIPTION Message-ID: <20221214174535.GA773264@nathanxps13> References: <20221206192551.GA3078082@nathanxps13> <20221206212954.GA3403597@nathanxps13> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2707695.1671039752@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Dec 14, 2022 at 12:42:32PM -0500, Tom Lane wrote: > Nathan Bossart writes: >> My first thought is that the latter two uses should be moved to a new >> parameter, and the apply launcher should store the last start time for each >> apply worker like the apply workers do for the table-sync workers. In any >> case, it probably makes sense to lower this parameter's value for testing >> so that tests that restart these workers frequently aren't waiting for so >> long. > >> I can put a patch together if this seems like a reasonable direction to go. > > No, I'm still of the opinion that waiting for the launcher to timeout > before doing something is fundamentally wrong design. We should signal > it when we want it to do something. That's not different from what > you're fixing about the workers; why don't you see that it's appropriate > for the launcher too? I'm reasonably certain the launcher is already signaled like you describe. It'll just wait to start new workers if it's been less than wal_retrieve_retry_interval milliseconds since the last time it started workers. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com