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 1pCwNj-0007ms-9l for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Jan 2023 05:32:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pCwNh-00077C-Eh for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Jan 2023 05:32:05 +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 1pCwNh-000772-5f for pgsql-hackers@lists.postgresql.org; Wed, 04 Jan 2023 05:32:05 +0000 Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pCwNe-0003jG-NF for pgsql-hackers@lists.postgresql.org; Wed, 04 Jan 2023 05:32:04 +0000 Received: by mail-ot1-x32c.google.com with SMTP id l8-20020a056830054800b006705fd35eceso20259648otb.12 for ; Tue, 03 Jan 2023 21:32:02 -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=r24xzqfPTrPtRW4ITQpdP8dHY6M1L1uZtORWuANbwxE=; b=irNpuiUE6+TSzNEFltYWiq+jXLe3KS/DlR9n824pfMLV4tF1rx+jE97bFr1ruM02QB pjxihpvDRpFBrbaKGqGoy80s3nQsvxO4j8XqAhuuHrVhMsLLBK7V360FOTRrBPRtOa2l +qozoruqAzOn2gdpwMN4x+gy7UZswhzF8Gx0EANi42ADB4DRtSCIQSGJKxspNpoiocX1 PoZUQfR/SM3GmfHQWKeNivUfFutzfzADqC7q2TRGwFAJw7eXv9J267lkjCFtYMLYn4is xxK0+T8G6WLc2FjbMCeCn/ewEx3ojNFw4teYUwozbnphO/5e+Xa3QmjTvkjaDZjFjKtD BVKg== 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=r24xzqfPTrPtRW4ITQpdP8dHY6M1L1uZtORWuANbwxE=; b=HkgmDdIn8VqvetQTIqvNC+QPbjKP05BRPkiVj1R1g4V+2ArSRJqsxy3pOTuVaDB1Cj rwJoAXXWycr4kZDVl2soorRPn0H+ez0j4jsikIEk5S32CfqHN/CME/M30NNkdvhAtkq0 LEyAkUU3KQ6pvEkosESyqgIcM5ihEDNvlTA1kkQR3Df4hrxfOeqqscLmXok8XazWDgQt cNZ9AOOxUDGLZsPuIVFbrSMJt8LWvKX5gRl5UHscQBeyzJFld69jKNk5NbfhqKCS5jGw bX0MBY8Px4ClMROWQGHi0zH2e104L1jtpuLRemjBJcRyC7Bg4YNVWBlQjIwCFh6cyqOj I15A== X-Gm-Message-State: AFqh2kobvX32AU+m5CFXtUi5Q48uDKfmRT9ItVOGIOYIzQHGrhBC42WG CqK7Wna9iakyBn/EVOUdPXE3rERnQgTGQZBW9r8= X-Google-Smtp-Source: AMrXdXsKrXybbRg7Ye3erOaNpgHlLAhQdIFYPDAKgUUfQ9cSrWRXfgyaZkUcFEQjqBbesoZz+nZMgWoVm9/SI2Ql7l8= X-Received: by 2002:a05:6830:1bfb:b0:671:eb0a:6b84 with SMTP id k27-20020a0568301bfb00b00671eb0a6b84mr2458443otb.350.1672810322011; Tue, 03 Jan 2023 21:32:02 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Masahiko Sawada Date: Wed, 4 Jan 2023 14:31:25 +0900 Message-ID: Subject: Re: Perform streaming logical transactions by background workers and parallel apply To: "wangw.fnst@fujitsu.com" Cc: Amit Kapila , "houzj.fnst@fujitsu.com" , Peter Smith , Dilip Kumar , "shiy.fnst@fujitsu.com" , PostgreSQL Hackers 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, Jan 3, 2023 at 2:40 PM wangw.fnst@fujitsu.com wrote: > > On Mon, Jan 2, 2023 at 18:54 PM Amit Kapila wrote: > > On Fri, Dec 30, 2022 at 3:55 PM wangw.fnst@fujitsu.com > > wrote: > > > > > > I've checked it and it looks good to me. > > > Rebased the other patches and ran the pgident for the patch set. > > > > > > Attach the new patch set. > > > > > > > I have added a few DEBUG messages and changed a few comments in the > > 0001 patch. With that v71-0001* looks good to me and I'll commit it > > later this week (by Thursday or Friday) unless there are any major > > comments or objections. > > Thanks for your improvement. > > Rebased the patch set because the new change in HEAD (c8e1ba7). > Attach the new patch set. There are some unused parameters in v72 patches: +static bool +pa_can_start(TransactionId xid) +{ + Assert(TransactionIdIsValid(xid)); 'xid' is used only for the assertion check but I don't think it's necessary. --- +/* + * Make sure the leader apply worker tries to read from our error queue one more + * time. This guards against the case where we exit uncleanly without sending + * an ErrorResponse, for example because some code calls proc_exit directly. + */ +static void +pa_shutdown(int code, Datum arg) Similarly, we don't use 'code' here. --- +/* + * Handle a single protocol message received from a single parallel apply + * worker. + */ +static void +HandleParallelApplyMessage(ParallelApplyWorkerInfo *winfo, StringInfo msg) In addition, the same is true for 'winfo'. The rest looks good to me. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com