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 1oxRTG-00031Q-E4 for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Nov 2022 11:29:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oxRTF-00010n-1y for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Nov 2022 11:29:45 +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 1oxRTE-00010d-Mk for pgsql-hackers@lists.postgresql.org; Tue, 22 Nov 2022 11:29:44 +0000 Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oxRT9-00086E-J9 for pgsql-hackers@postgresql.org; Tue, 22 Nov 2022 11:29:43 +0000 Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-3704852322fso141282047b3.8 for ; Tue, 22 Nov 2022 03:29:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=m+iAnuVW1zCuOZ9hRDN2SdmQWgY/ZPC/bNWgcHv3MTE=; b=dwkvszUXxNuptoHRoNl/cCPuClTtnKVQQXbhJnAhGF0muMQRSJexqe2aVxM/8d+dN/ ttDbGuYzm7td51cqCk9Gu1Ig8zJcaWPPIGEUHoBvkJYUU8YPjr0LkLll+6kwcbIz4/0H 7M+LnInrT9+hcgD/tI47bR/EwariNWT+OaQ8IYgnv3KnJ/1iqO+bLlxyk0dRjDBxgwTj TGTu8hORYdkKVjuannABpRdtTKekpFOrTOwuGWJr733QAiw2q+/w+3M/DD4gm+VU9BPP kUx3ovh8RqfUUV5yZ92FFzogKHFNZinOWLX4cGC5I3NTvaDy5pK3PxKuuIBskR0bxUMo 16IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=m+iAnuVW1zCuOZ9hRDN2SdmQWgY/ZPC/bNWgcHv3MTE=; b=uivEtJXQ9A2z6ey+CEDKN8S72MUzC7sKw/z/XtETc8sOTC001t7cVta5jFxbVyREY0 VTBotOvo5QtpskhKBmb7s4+TjKxSULgwbunMYHbhrLBv+Q8XFFDL2o/+fHmR0bhZ+CTm CFZBp9mY8YHlzWA8qDTVbvco5hhbObGMz3omG98N2qLr3Dblihn5ODEC90yhS4BuuiWi m8+EI2YaSViUIHMUI4hOCcjkQzBvHOrICQG06PpEWroGo1Cofj44og+lzDt61n5GaN+l KZURpwNSyDkSDFmE9XMfHP7MCjhQeB34I6e808ZVJIK862C/+7pdBD/zVOjqO0neqesM PPAQ== X-Gm-Message-State: ANoB5pnd4ISRmHQQIxgDdDpabN7VhpWS0BmGp0EF3eucfQHHLcdQ/PQX lYepci+mqlOLX8El6FjQth4tdn+6EKaS48yCbTX/vaUcaxxlLg== X-Google-Smtp-Source: AA0mqf7dGDPV70+NbXGelTQ2AR1him7aK2qZ6jJAxUCgfZZ4+kYHL8XNvicobqfbq5wSWy4XsiEW0HzR1pIqxXiC+vA= X-Received: by 2002:a81:538a:0:b0:329:88ec:ba20 with SMTP id h132-20020a81538a000000b0032988ecba20mr21908611ywb.492.1669116578635; Tue, 22 Nov 2022 03:29:38 -0800 (PST) MIME-Version: 1.0 References: <20221122004119.GA132961@nathanxps13> In-Reply-To: <20221122004119.GA132961@nathanxps13> From: Amit Kapila Date: Tue, 22 Nov 2022 16:59:28 +0530 Message-ID: Subject: Re: wake up logical workers after ALTER SUBSCRIPTION To: Nathan Bossart Cc: pgsql-hackers@postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Nov 22, 2022 at 6:11 AM Nathan Bossart wrote: > > While working on avoiding unnecessary wakeups in logical/worker.c (as was > done for walreceiver.c in 05a7be9), I noticed that the tests began taking > much longer. This seems to be caused by the reduced frequency of calls to > maybe_reread_subscription() in LogicalRepApplyLoop(). > I think it would be interesting to know why tests started taking more time after a reduced frequency of calls to maybe_reread_subscription(). IIRC, we anyway call maybe_reread_subscription for each xact. -- With Regards, Amit Kapila.