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 1pRaQY-00037Y-KZ for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Feb 2023 15:07:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pRaQX-0000rY-Hx for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Feb 2023 15:07:33 +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 1pRaQX-0000rF-6s for pgsql-hackers@lists.postgresql.org; Mon, 13 Feb 2023 15:07:33 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pRaQS-0002nw-Tk for pgsql-hackers@lists.postgresql.org; Mon, 13 Feb 2023 15:07:32 +0000 Received: by mail-wm1-x32b.google.com with SMTP id s13-20020a05600c45cd00b003ddca7a2bcbso3910087wmo.3 for ; Mon, 13 Feb 2023 07:07:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WYqwd5Cv9EUqJASpWXx1XZ3yZjxWNRupjswEgdSRv2I=; b=dVM3nDv1VhJBW0jDa/fsFmztZdKfthmEke3/ImbUI3Y+wLkvlekFvROJsHQg4HsOOq P5H9PAHOi28G1ClV5HTwbyp51ZfjZNbBWADfllG5wCEpSOFHpStzCHvxpDXvE/wO/4Ub srzzRoVUjV1QeSe2IIuyIy5eZ9MWYHSgxGG374U1yvzYKxORyhmhOJu+g+21TYCpsCdY rfkq7EhLjuQdvmJ3zSfCWw/RyMbn5vYpm0p0QxGUdL+VFwVsnF93mpw6OYTEVbhmU8un Eqi5r5g5RXjVSIB1a0C1UBLWkf//LzDyxHaNMenXGELBEWhDD9OBr+LrKovySWqhHSA2 SuLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WYqwd5Cv9EUqJASpWXx1XZ3yZjxWNRupjswEgdSRv2I=; b=sp+g4shlSJ30FfPtkkgOmS0eYK5LyFsLi8i5/os0+s3azPS8QUI++PmZKK9UKvgqFr fdOV3XIqeChsK2gIxtHAOX5sx554UOrJOh3xp7vH/dCfehH6xKtYc/BU2ZyKT/yH85Pr uO0UO39mud/FwxKdsUDd7R8Ml5jwTzNtO0YcVAcXAvNnr+ouZuGZVxLsrH+TZe6A/Mat zsLczg4SumBiQXNCsTqCT3SHdEab+OeFsCNMcepyp254IfmpgmqWgw6IWgov3XmuC9fr J0ow/7jY7G7r0Bz26XaPLLDF5sQPJxcC8BOaeYvfBQ1TProFxifnFkqMVTHXv5LCiGFm LyIA== X-Gm-Message-State: AO0yUKW91b2zxA1aS3eQ80lq8vR+vZR5s5Rgf3dGMlcLwAGzjOYvsvRV GONP+3SxZwbXX//mwiFuQzY= X-Google-Smtp-Source: AK7set8hIf3u6ty6Jh0tHYBQrI7mlHLC7J4XR5uu9TUtzeaycifIcVt1oZLOhAy8kxq504HkcGg7xA== X-Received: by 2002:a05:600c:4a9c:b0:3dd:1b6f:4f30 with SMTP id b28-20020a05600c4a9c00b003dd1b6f4f30mr23882808wmp.3.1676300847202; Mon, 13 Feb 2023 07:07:27 -0800 (PST) Received: from [192.168.26.132] ([54.239.6.184]) by smtp.gmail.com with ESMTPSA id ja13-20020a05600c556d00b003dc4b4dea31sm13508462wmb.27.2023.02.13.07.07.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Feb 2023 07:07:26 -0800 (PST) Message-ID: <1b54a21f-5f6f-1df1-2ce6-5acc8b4bfaa5@gmail.com> Date: Mon, 13 Feb 2023 16:07:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: Helper functions for wait_for_catchup() in Cluster.pm Content-Language: en-US To: Alvaro Herrera Cc: PostgreSQL Hackers References: <20230213105802.5id6zja2bmkd4czo@alvherre.pgsql> From: "Drouvot, Bertrand" In-Reply-To: <20230213105802.5id6zja2bmkd4czo@alvherre.pgsql> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2/13/23 11:58 AM, Alvaro Herrera wrote: > On 2023-Jan-26, Drouvot, Bertrand wrote: > >> Hi, >> >> On 1/26/23 10:42 AM, Alvaro Herrera wrote: >>> On 2023-Jan-26, Drouvot, Bertrand wrote: >>> >>>> On 1/24/23 7:27 PM, Alvaro Herrera wrote: >>> >>>>> 1. I don't think wait_for_write_catchup is necessary, because >>>>> calling wait_for_catchup() and omitting the 'mode' and 'lsn' arguments >>>>> would already do the same thing. >> >> Having a closer look, it does not seem to be the case. The default mode >> in wait_for_catchup() is 'replay' and the default mode for the lsn is 'write'. >> >> But in wait_for_write_catchup() we are making use of 'write' for both. > > But that turns > $node->wait_for_catchup('foobar', 'write') > into > $node->wait_for_write_catchup('foobar'); > so I don't see much value in it. Agree. > Also, the patch series from which this > patch spawned in the first place doesn't wait for write AFAICS. > Right, it does wait for replay only. > After adding some more POD docs for it, I pushed the one for replay. > Thanks! Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com