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 1pXBfY-0007b9-Gx for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Mar 2023 01:54: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 1pXBfX-0007eT-67 for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Mar 2023 01:54: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 1pXBfW-0007eK-RK for pgsql-hackers@lists.postgresql.org; Wed, 01 Mar 2023 01:54:10 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pXBfU-0007Hx-D9 for pgsql-hackers@postgresql.org; Wed, 01 Mar 2023 01:54:09 +0000 Received: by mail-lj1-x235.google.com with SMTP id h3so12352774lja.12 for ; Tue, 28 Feb 2023 17:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677635647; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BW8lhN15QfUx5xN5WjZPGaRg20EVXDzaa65jZnwPNqg=; b=NDcTMYl8hXoBscCUpSL5741u0MhT/xhczd7YdrPbW5joDWKGPUgHExEXJWOOMzzGfk OfmUN1CJGDwRxz5dCW3oU9iJIQQpVZikF5aV6/a+TiqhzwbMR40AaS/k0P9/BKCR6WI+ M32Of2YEKTsbc72RuBpCk29LhekCK5mVQceofREqcBnDqvZ1ILOyWSCAi7VeQWECNOgP +gW1TmIyKlGjVdjryGpsYc9fmjr5LbJSKriL1ftP4kdzxzMWN3GLLwcsyEHyc3q9fhb8 Okbby9zuKTzVvPCcpSD4lPykY2aqplrkde7WcYJM7+tthS8uG+2xZ3NZ4gZZPOXplMAp Bhqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677635647; 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=BW8lhN15QfUx5xN5WjZPGaRg20EVXDzaa65jZnwPNqg=; b=ZJ+X34J5w+Srxzom9wj+NsF8ZhqRpJd7YjQZ6O8mK2Nm0XJ/3rCIc0wicLXtMww7Y/ OhzuyGvnZcZAPWzq5YBSuPfC8Qt/mNjXl8D6ofUtDXKDqPe/YvvKG4/xsEIuLt5pBzoo I4eRC9gyHXDYjnSDeVhseLvos2nI9442Ab8bQjWdfCClRbtOk6ygsYBZ3NOh7pLkg7GZ SMjfAuLboMjobmFVmFi7OXsgbrCSB7S0YQqe+MvQlzYNGw7F/9CSgzJMeLfyLEKB4YPb 0qx6cUgENBi3X/t1IyUmGT5SfcQO8ItLTiUWl9Wpbq8MZUwoh+UevNgDJh6ov1i0AT4p avyg== X-Gm-Message-State: AO0yUKVHyBo9XFJ421oTy2ysi722gZwN/ZAjm/FPnPme2MKjQyznqIgi gLdRptDaQKePUK4So0fq0nbpKgE/+kgCGTBZcaQ= X-Google-Smtp-Source: AK7set8DJIOjt1OcSWLU4vAb1JdpM34G5abPM2qypxLtxiyRKVwIKm0WURqu2WUT2AMFSpotfTewdQF5+RpDLKCUWw4= X-Received: by 2002:a05:651c:1243:b0:295:93eb:bab1 with SMTP id h3-20020a05651c124300b0029593ebbab1mr1520610ljh.1.1677635646632; Tue, 28 Feb 2023 17:54:06 -0800 (PST) MIME-Version: 1.0 References: <20230216.142101.1198410163394123325.horikyota.ntt@gmail.com> <20230216.175546.98020490115903046.horikyota.ntt@gmail.com> In-Reply-To: From: Peter Smith Date: Wed, 1 Mar 2023 12:53:49 +1100 Message-ID: Subject: Re: Time delayed LR (WAS Re: logical replication restrictions) To: "Hayato Kuroda (Fujitsu)" Cc: Amit Kapila , Masahiko Sawada , "shiy.fnst@fujitsu.com" , Kyotaro Horiguchi , "andres@anarazel.de" , "vignesh21@gmail.com" , "shveta.malik@gmail.com" , "Takamichi Osumi (Fujitsu)" , "dilipbalaut@gmail.com" , "euler@eulerto.com" , "m.melihmutlu@gmail.com" , "marcos@f10.com.br" , "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 Here are some review comments for v9-0001, but these are only very trivial. ====== Commit Message 1. Nitpick. The new text is jagged-looking. It should wrap at ~80 chars. ~~~ 2. 2. Another reason is for that parallel streaming, the transaction will be opened immediately by the parallel apply worker. Therefore, if the walsender is delayed in sending the final record of the transaction, the parallel apply worker must wait to receive it with an open transaction. This would result in the locks acquired during the transaction not being released until the min_send_delay has elapsed. ~ The text already said there are "two reasons", and already this is numbered as reason 2. So it doesn't need to keep saying "Another reason" here. "Another reason is for that parallel streaming" --> "For parallel streaming..." ====== src/backend/replication/walsender.c 3. WalSndDelay + /* die if timeout was reached */ + WalSndCheckTimeOut(); Other nearby comments start uppercase, so this should too. ====== src/include/replication/walreceiver.h 4. WalRcvStreamOptions @@ -187,6 +187,7 @@ typedef struct * prepare time */ char *origin; /* Only publish data originating from the * specified origin */ + int32 min_send_delay; /* The minimum send delay */ } logical; } proto; } WalRcvStreamOptions; ~ Should that comment mention the units are "(ms)" ------ Kind Regards, Peter Smith. Fujitsu Australia