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 1p5Fpg-0001Xr-T9 for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 00:41:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p5Fpf-0008PJ-PP for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 00:41:11 +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 1p5Fpf-0008PA-E8 for pgsql-hackers@lists.postgresql.org; Wed, 14 Dec 2022 00:41:11 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p5Fpc-0006Wy-Ie for pgsql-hackers@postgresql.org; Wed, 14 Dec 2022 00:41:10 +0000 Received: by mail-pg1-x52a.google.com with SMTP id q71so973086pgq.8 for ; Tue, 13 Dec 2022 16:41:08 -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=4Pf1GUffe4Xa6eVmxAnxvhCRR/Zmp0lwAb8gMX7B14I=; b=WhoPgXyK7J/xDOnyVe6r5BYfffjeivz4tc8rgRTF/wH9ZlP8+7vZvX2+m2oUUO4kGs UboDi0tJyWjtsjYNO9VUO4af/fnZPWf2MedMjeKt9kddqLWwAeu7zC/UFpBeo322YiEc PUIxH24k9C3McD/b14CUQ8I0ewkfcFuWdI3rM4JhKUc7hQKAXob2w8BUoZQn7gr7enA7 p4i4VlqFHhDKrQkLfu5CcB6179y/b+bWBHlPDJXUFZUS2bS/HcnI8IdSnkBSKnhD6F/Y hvWK0K6kZ4hfnVPNKRHSGXsaIgObJekVKGfmfyRECn+nLxAyAPQc52r9FAyiQ0JHKE24 ot3Q== 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=4Pf1GUffe4Xa6eVmxAnxvhCRR/Zmp0lwAb8gMX7B14I=; b=BjbNBOaNgh2749xdUWff7jzC4PeEPdw/eeqABsO9yImW7ZXQBaX5g8kdGzcFHv7t7U NHsKZ+5vnjEiIp6/jLvhSUSvoNPDnDij9nqze2uGhlXBEDcKBMrwK9VeGAdC7QVCZ8kI nMqFoe1DapembKQE9cCXOpWQOezlnMLtJiLxEQZ07zTlppxvyy8tfsxatC1WQZPHlas9 UXW1Gyv8z6Ef4EAK/7+ffvO9rmwwnf6SpnCHR3QVDrUyGQJAwPNgBfqhD5SLcUwV3k+/ 64IvnKpTcPbz7zlTXJlvqAZYGEmtygXzXyp1nLTe8AW7KrwrKUTIdnMfCKjr/7qYFdFx sAkg== X-Gm-Message-State: ANoB5plaP7kXGlEGeBvLMJ/iw6Hi7hGNIgTEkbHeb+NkssFYUisYY7ZJ 2PQ2p7MH97m2ss1v94Xoz/A= X-Google-Smtp-Source: AA0mqf4GwKvVR6zGHHdk2oRCcgQ77TtN9eXxToTAq+BI/oZVRaniyl5Xa8/HeS88poBMseqOWJvbPQ== X-Received: by 2002:a62:17c4:0:b0:578:43e3:f48e with SMTP id 187-20020a6217c4000000b0057843e3f48emr13568156pfx.16.1670978467522; Tue, 13 Dec 2022 16:41:07 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id r7-20020aa79ec7000000b005765df21e68sm8449702pfq.94.2022.12.13.16.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 16:41:07 -0800 (PST) Date: Tue, 13 Dec 2022 16:41:05 -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: <20221214004105.GA669835@nathanxps13> References: <20221202002130.GA2124877@nathanxps13> <20221202192101.GB2277157@nathanxps13> <20221206192551.GA3078082@nathanxps13> <20221206212954.GA3403597@nathanxps13> <20221207181145.GA3698731@nathanxps13> <2550453.1670974328@sss.pgh.pa.us> <20221214000145.GA638663@nathanxps13> <2561155.1670977214@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2561155.1670977214@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Dec 13, 2022 at 07:20:14PM -0500, Tom Lane wrote: > I certainly don't think that "wake the apply launcher every 1ms" > is a sane configuration. Unless I'm missing something basic about > its responsibilities, it should seldom need to wake at all in > normal operation. This parameter appears to control how often the apply launcher starts new workers. If it starts new workers in a loop iteration, it updates its last_start_time variable, and it won't start any more workers until another wal_retrieve_retry_interval has elapsed. If no new workers need to be started, it only wakes up every 3 minutes. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com