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 1pGAsT-0001t9-40 for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Jan 2023 03:37:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pGAsR-0008Al-LP for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Jan 2023 03:37:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pGAsR-0008Ab-Ca for pgsql-hackers@lists.postgresql.org; Fri, 13 Jan 2023 03:37:11 +0000 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pGAsP-0003Y3-FM for pgsql-hackers@lists.postgresql.org; Fri, 13 Jan 2023 03:37:10 +0000 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-1442977d77dso21082944fac.6 for ; Thu, 12 Jan 2023 19:37:09 -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=8KB1MTI75+tv9rItr61CulWwExmUis+LhejgRn30kXo=; b=I9h1xf3RBUt1qhIe01+sVL8/MyFRNteeAYpD8XJuP//b4flkIQNmxqyGnb7vcx2UUf eR8gYFK/gB1bVL2cifDvSqFDjgzvtC3bpZgpUZVhC/qd6D59nMaq4jYPwcMyUV4f9x/h XMXQdkyKlaF0+qfhjaKMeLNsOd/qd+ou+VBV2vjpbElWOsY57qDcb+tlVcCCAFkYwrzW YpqqWr1zmlSgYEV7oidMIO/FnIwaWQpgFfxdpVG66mGeWpkuvaTxFr7BNlTdXnPsLAl5 +6PiJ4bO1ggN1i/W2RACfVx7ChkCOleHZIe9yrA5YF0Xnjad23jEd09WKb8nJPAHS9Ar u3WA== 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=8KB1MTI75+tv9rItr61CulWwExmUis+LhejgRn30kXo=; b=DgtB4RLpeEYDqYK4pF0yFguSkvRGU0cr+cgs6amgipIQu7mXNUqKC4CrBOw+LF/VA/ 3rN6Hz9Gw6W8s3orI99A/3wmcWDur8RpeWIo3LJoZm6RMy4sL41Q/EDu7Ci2PnIP6A7Z L8SWSbAzlBYRdCsyug58uYf/mFH8ax84JOcP/cOPELjsaxT/2yhA7X+C7SxiBBmHQR19 b2gvaudJRaiWwzKf3g2ip1sen9BdBixeH78lpzUlA8JvpJWc3CCYDyLdyO4EYMqponi4 W6xV8CaWDOhfZSPx9nyTRYOnF0G/A0MToFbOWtjj+vid3Mq+/YjQ86B6eEHCtf9sXjAd nHOA== X-Gm-Message-State: AFqh2kr6u5XQ+l4yxufdJJVuNogJ5C0DCP7UxWTx7MAw+goNE13vQ4qa D+bt7BL5WpW/e6JWjB++X+jC+6bt7+meIcSjgPQ= X-Google-Smtp-Source: AMrXdXtkWpaBtkecf66fzEPhOkKDQPfj3jPCMqqQVHIWlpY4PbVvrsThKqVSA4IzTf8CVom0ZXNTcESj7TlQgMEQ/eg= X-Received: by 2002:a05:6870:2f12:b0:150:a3eb:4de2 with SMTP id qj18-20020a0568702f1200b00150a3eb4de2mr2709592oab.165.1673581027351; Thu, 12 Jan 2023 19:37:07 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Fri, 13 Jan 2023 09:06:55 +0530 Message-ID: Subject: Re: Perform streaming logical transactions by background workers and parallel apply To: Peter Smith Cc: "houzj.fnst@fujitsu.com" , shveta malik , Masahiko Sawada , "wangw.fnst@fujitsu.com" , "shiy.fnst@fujitsu.com" , PostgreSQL Hackers , Dilip Kumar Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jan 13, 2023 at 7:56 AM Peter Smith wrote: > > Here are my review comments for v79-0001. > > ====== > > General > > 1. > > When Amit suggested [1] changing the name just to "leader_pid" instead > of "leader_apply_pid" I thought he was only referring to changing the > view column name, not also the internal member names of the worker > structure. Maybe it is OK anyway, but please check if that was the > intention. > Yes, that was the intention. > > 3. > > > + leader_pid integer > + > + > + Process ID of the leader apply worker if this process is a parallel > + apply worker; NULL if this process is a leader apply worker or does not > + participate in parallel apply, or a synchronization worker > + > > I felt this change is giving too many details and ended up just > muddying the water. > I see that we give a similar description for other parameters as well. For example leader_pid in pg_stat_activity, see client_dn, client_serial in pg_stat_ssl. It is better to be consistent here and this gives the reader a bit more information when the value is NULL for the new column. > > 4. > > @@ -949,6 +949,7 @@ CREATE VIEW pg_stat_subscription AS > su.oid AS subid, > su.subname, > st.pid, > + st.leader_pid, > st.relid, > st.received_lsn, > st.last_msg_send_time, > > IMO it would be very useful to have an additional "kind" attribute for > this view. This will save the user from needing to do mental > gymnastics every time just to recognise what kind of process they are > looking at. > This could be a separate enhancement as the same should be true for sync workers. -- With Regards, Amit Kapila.