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 1nXcdQ-0000hd-7j for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Mar 2022 05:37:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nXcdP-0006Nu-2L for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Mar 2022 05:37:15 +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 1nXcdO-0006L7-Mx for pgsql-hackers@lists.postgresql.org; Fri, 25 Mar 2022 05:37:14 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nXcdH-00078C-PO for pgsql-hackers@lists.postgresql.org; Fri, 25 Mar 2022 05:37:14 +0000 Received: by mail-pf1-x429.google.com with SMTP id p8so5622597pfh.8 for ; Thu, 24 Mar 2022 22:37:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=zTDqPt+jIy7yQDISczf2ROM2/dJ8NmZfNWoaxgSx0vA=; b=f1D7Aj0eJOVeg4OD96SDQ4Ku2VN0P3qkKp3wbX4f8Sd7B6ybCfKV1bjI7oTo+EIkK2 oQXbKr2PGjxm+WhjkVgKbfQnMQxxgkwC34gsyzzA8t5p3YTkDhJnNCtaAaJSMJXWXXYQ ge0B2AIhDjQHQ4tHy64UaqPk7IJdZ6+9Z7pQvzkwPn5f6cioLK/koDucQCCub5Z/R0HY Lx6j7cgUS+WN3cIYb+Typ0kncgWg7kXFmCeCMX/Xr/dGNA8YkHe6kryNlij+nX50iwNa YnKU/syAPebV7J8QYrsTI5VUGg248oeV/u6pFcZtlVi/8gJX7L4Bdc7XKhNAV/A3Zdan rnQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=zTDqPt+jIy7yQDISczf2ROM2/dJ8NmZfNWoaxgSx0vA=; b=YFze1q355uZ3U7j+gp6w0UxQdpLrHEDLG1PfLu0Rw0HNR55MXjhKY9NSy//PRdFH86 FgdT836hSjkgscpfRrAzGuD2YHJsgIlcgLoeqCD9A0vyX63WbmpcwVSDMisf3WwdfCaF TN60YdMJ0w0zmP+d3vqqA8j/RGYiOPTUlg1w0Ry3PrmpyTi2rPjJKS1BEoXIOSskwLSe 6Ar1FkIs4XJv4ave9aJS/O/8vKPjSuPNrVmfy5qjasQkgTtcP4fWIMI0ymGVpDcP7Zhg nkJot7UtGYjuC8uqxKnJC5YEw3p9CUOgRpat6H3g52Tzn7KJCl91OvdtZXOe1u1Tp8j6 KoJg== X-Gm-Message-State: AOAM532B6lpepr8aKvWld8EW1FJQA76I834eaTOioqrw3FqqtS8eLXtr XYANx0DYu++1V6wRuyfGwWOhlaVIcaDibxsVIUI= X-Google-Smtp-Source: ABdhPJxsUgeGlW6dNWYCI80rNJq8nDLu5CR2jESviIK06Hb9LcE+hsWC4U3G7l0bOJKH4zNCqplcS5WKTOygyHujI/k= X-Received: by 2002:a65:524b:0:b0:383:1b87:2d21 with SMTP id q11-20020a65524b000000b003831b872d21mr6667467pgp.482.1648186625141; Thu, 24 Mar 2022 22:37:05 -0700 (PDT) MIME-Version: 1.0 References: <20211217.140309.1173685089580065514.horikyota.ntt@gmail.com> In-Reply-To: From: Masahiko Sawada Date: Fri, 25 Mar 2022 14:36:28 +0900 Message-ID: Subject: Re: Failed transaction statistics to measure the logical replication progress To: Amit Kapila Cc: "osumi.takamichi@fujitsu.com" , Peter Smith , "tanghy.fnst@fujitsu.com" , "wangw.fnst@fujitsu.com" , Kyotaro Horiguchi , "vignesh21@gmail.com" , "houzj.fnst@fujitsu.com" , "pgsql-hackers@lists.postgresql.org" , Greg Nancarrow 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 Thu, Mar 24, 2022 at 12:30 PM Amit Kapila wrot= e: > > On Thu, Mar 3, 2022 at 8:58 AM osumi.takamichi@fujitsu.com > wrote: > > > > This patch introduces two new subscription statistics columns > (apply_commit_count and apply_rollback_count) to the > pg_stat_subscription_stats view for counting cumulative transactions > commits/rollbacks for a particular subscription. Now, users can > already see the total number of xacts committed/rolled back in a > particular database via pg_stat_database, so this can be considered > duplicate information. Right. > OTOH, some users might be interested in the > stats for a subscription to know how many transactions are > successfully applied during replication because the information in > pg_stat_database also includes the operations that happened on the > node. I'm not sure how useful this information is in practice. What can we use this information for? IIRC the original purpose of this proposed feature is to provide a way for the users to understand the size and count of the succeeded and failed transactions. At some point, the patch includes the statistics of only the counts of commits, rollbacks, and errors. If new statistics also include the size, it might be useful to achieve the original goal. But I=E2=80=99m concerned that adding only apply_commit_coun= t and apply_rollback_count ends up adding the duplicate statistics with no concrete use cases. > I am not sure if it is worth adding this additional information or how > useful it will be for users. Does anyone else want to weigh in on > this? > > If nobody else sees value in this then I feel it is better to mark > this patch as Returned with feedback or Rejected. We can come back to > it later if we see more demand for this. Marking as Returned with feedback makes sense to me. Regards, --=20 Masahiko Sawada EDB: https://www.enterprisedb.com/