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 1mAqSP-0004qR-7D for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Aug 2021 09:11:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mAqSN-0003YG-OJ for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Aug 2021 09:11:27 +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 1mAqSN-0003Y8-Ed for pgsql-hackers@lists.postgresql.org; Tue, 03 Aug 2021 09:11:27 +0000 Received: from mail-yb1-xb2c.google.com ([2607:f8b0:4864:20::b2c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mAqSL-0001FA-3R for pgsql-hackers@lists.postgresql.org; Tue, 03 Aug 2021 09:11:26 +0000 Received: by mail-yb1-xb2c.google.com with SMTP id w17so32779050ybl.11 for ; Tue, 03 Aug 2021 02:11:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8k54VkEUg1GSPZYipWzaYzKN9YrDn6jOejPTLbFZ8Qw=; b=k4J5vOscCTAACO3y7HYY0enXNfzpk3TOplboZht3rWi5R/twKRK3MzkvKI6ePvx387 /WT+ZCP4vqMksvJKb7vCyUW/DbNayB4ceipcdj6tTHzr1a/VCJeNiU6mbdlD0wvNxsET VmOcBzcJ1zBLmj7rH7QfVLvuzNU3ggp6NZHZ2pqbbIzywQL7n69OPIpp2AVQZy6frvJ2 GUmUF2aTNZxz+1JrJMdJhfnM/V75n7KYV63kEbQa0TY1ZIy2VA1kn8kMNsXZpFfEKHXN 85E+yv8JLcJ0nugsnLXkT7YxF/jKVuwIbLHYQFPCYAFW3e5t4a2vqh5qwL8u9IBpIdv5 hhNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8k54VkEUg1GSPZYipWzaYzKN9YrDn6jOejPTLbFZ8Qw=; b=VWI8m6AnKwE2ac1uMKFZgmYxexfvJlSBIqTQ3ZGsIHbBPWm22NxLCQM7wN7akTQ+NS 6Yi+6zUOjS0jHTt6UMya8419koRjbfpdISpFj2frhd/4YSgt/q3Q5QDkp6tsdF5diAIB p3AIDKj34NlWIz/AvQMDi8HOn1qfElPhs0agKbANQW3YD9Zj3nEU5+E1bCL9u6xDQolH 805YMN7fcQP84SfqMzXI7Gv2LlMUnuD9UNO32YXD9Msqkc9fCIrc5SajkgM5Nx3U3lsv HEdje3yB45fyPi4Ppn8Mc0lVknZlOy+7wdb637aoPboBAHo75VLPn18kWQFMjEWwU2TQ MTBQ== X-Gm-Message-State: AOAM53398BDtSYdnlAlQ7IEknkpY26Rc1RQVjJ8dbpFoz4rOnsabuDDB Akqxv3rRuS+PkrgGnZYRwHuKa2pjNnB42lY6BiI= X-Google-Smtp-Source: ABdhPJwQIoL6Ppjh8rS8ETd+Eokmt6kUsP717VSusmi5JIMSk3wtx9JOCQH6u6eBsxcPGaCNTOioZrV6Ihi8Re9S1LU= X-Received: by 2002:a25:9a44:: with SMTP id r4mr27101933ybo.419.1627981883108; Tue, 03 Aug 2021 02:11:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Tue, 3 Aug 2021 14:41:12 +0530 Message-ID: Subject: Re: Failed transaction statistics to measure the logical replication progress To: Masahiko Sawada Cc: "osumi.takamichi@fujitsu.com" , "pgsql-hackers@lists.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 On Tue, Aug 3, 2021 at 10:59 AM Masahiko Sawada wrote: > > On Tue, Aug 3, 2021 at 11:47 AM Amit Kapila wrote: > > > > On Mon, Aug 2, 2021 at 1:13 PM Masahiko Sawada wrote: > > > > > > On Mon, Aug 2, 2021 at 2:52 PM osumi.takamichi@fujitsu.com > > > wrote: > > > > > > > > > > > > Accordingly, I'm thinking to have unsuccessful and successful stats on the sub side. > > > > Sawada-san is now implementing a new view in [1]. > > > > Do you think that I should write a patch to introduce a new separate view > > > > or write a patch to add more columns to the new view "pg_stat_subscription_errors" that is added at [1] ? > > > > > > pg_stat_subscriptions_errors view I'm proposing is a view showing the > > > details of error happening during logical replication. So I think a > > > separate view or pg_stat_subscription view would be a more appropriate > > > place. > > > > > > > +1 for having these stats in pg_stat_subscription. Do we want to add > > two columns (xact_commit: number of transactions successfully applied > > in this subscription, xact_rollback: number of transactions that have > > been rolled back in this subscription) > > Sounds good. We might want to have separate counters for the number of > transactions failed due to an error and transactions rolled back by > stream_abort. > I was trying to think based on similar counters in pg_stat_database but if you think there is a value in showing errored and actual rollbacked transactions separately then we can do that but how do you think one can make use of it? -- With Regards, Amit Kapila.