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 1opSHG-0001UC-G1 for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Oct 2022 10:44:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1opSHF-00064h-9n for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Oct 2022 10:44:21 +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 1opSHF-00064X-0Y for pgsql-hackers@lists.postgresql.org; Mon, 31 Oct 2022 10:44:21 +0000 Received: from mail-yw1-x112e.google.com ([2607:f8b0:4864:20::112e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1opSHC-0002W0-K0 for pgsql-hackers@lists.postgresql.org; Mon, 31 Oct 2022 10:44:19 +0000 Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-368edbc2c18so103638727b3.13 for ; Mon, 31 Oct 2022 03:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SdOxw4TYqR3X20s/LGZeHFzWNdDfWsxorh7H4tpsZAw=; b=oRw1wmX2RpUBVPZ5S2m+imksPDu4i5f+SNwQOpNZnmCicGlDAlMBXZjILai2rSiUpM gQdqRh/c0w9d9iOSum5oBLFV48YCbr/RoKzEqe9Kr40l1P3o5IYix2p1Y3ZNrKkKvRQ5 KjKwDM9YlHtCPJSxuxHmNPv+cwvu7Svkh+XwYm8zQXHgk9JI2NGpVuF0RV9mQI9P0NyR 6VjrzQ8YACIeKNGC5UDrJK9lVGp8tVtBDZyox2ZvwT06bbvPyGCl9SOCx4dndQdS+ZWh UCuzjUlLv5fKcO7cXVX/YKz5ll8EYnRHT0CdrG15OIOZVhjjWSirFSexZHP5lLdsqxcC OS8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=SdOxw4TYqR3X20s/LGZeHFzWNdDfWsxorh7H4tpsZAw=; b=MG/VTf2E5zq26RwgPzns2hHKkNgsOkuaSOIAH36uRe806eCUJJGTJ5fvMc0BzZJyBz 15ZYVlv1JEWpAvRbsdnCNVlSKx0PD08gx7KxEK9VbfUNssT5WLUybt53YX/I2QAi/MyU 71QHG/Iy8CU59sy1ZIrw2mFQK/Td2Ql1oBMY3caebTO9VBM1tZdIA6hC7eSuuGMQi4TO adQhtYyxw2yQKqMOQpEi+YrL6gVcAmrFCO77UHRyQtMrp28dvG+hd+3ERz/rk8pVFg7S nngD4unFFeithBnXASeXglFkeNlpckLMsihgrXUtYlOGhycMVFt8/7mPGyZ+7buk1QSo 6LIQ== X-Gm-Message-State: ACrzQf3CUcpLZDohNRxl9LnZqI0RXXcQvj4LoFbPHHS/8ZYzAAlau9Eu 1HZ8+tazYgXGIdcZQF6Ziq8epybXVe2tzcE8FEh0tFtS878= X-Google-Smtp-Source: AMsMyM5a7ALZWv97szwB4a47vsiE5D1yZLw0HqvGP8bmU5yZiDk8s/9aQ0nk7hmEzZrvs+dDsdAc2D8Zu8Yf848XngA= X-Received: by 2002:a0d:fd81:0:b0:367:8b01:8809 with SMTP id n123-20020a0dfd81000000b003678b018809mr12228489ywf.404.1667213057571; Mon, 31 Oct 2022 03:44:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Mon, 31 Oct 2022 16:14:06 +0530 Message-ID: Subject: Re: Perform streaming logical transactions by background workers and parallel apply To: "shiy.fnst@fujitsu.com" Cc: "wangw.fnst@fujitsu.com" , Peter Smith , "houzj.fnst@fujitsu.com" , Dilip Kumar , Masahiko Sawada , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Oct 28, 2022 at 3:04 PM shiy.fnst@fujitsu.com wrote: > > On Tue, Oct 25, 2022 2:56 PM Wang, Wei/=E7=8E=8B =E5=A8=81 wrote: > > I tried to write a draft patch to force streaming every change instead of > waiting until logical_decoding_work_mem is exceeded, which could help to = test > streaming parallel. Attach the patch. This is based on v41-0001 patch. > Thanks, I think this is quite useful for testing. > With this patch, I saw a problem that the subscription option "origin" do= esn't > work when using streaming parallel. That's because when the parallel appl= y > worker writing the WAL for the changes, replorigin_session_origin is > InvalidRepOriginId. In current patch, origin can be active only in one pr= ocess > at-a-time. > > To fix it, maybe we need to remove this restriction, like what we did in = the old > version of patch. > Agreed, we need to allow using origins for writing all the changes by the parallel worker. --=20 With Regards, Amit Kapila.