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 1mUiTZ-0005si-9Z for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Sep 2021 04:42:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mUiT2-0001or-5k for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Sep 2021 04:42:16 +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 1mUiT1-0001oj-RZ for pgsql-hackers@lists.postgresql.org; Mon, 27 Sep 2021 04:42:15 +0000 Received: from mail-yb1-xb2c.google.com ([2607:f8b0:4864:20::b2c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mUiSz-0003Km-H4 for pgsql-hackers@lists.postgresql.org; Mon, 27 Sep 2021 04:42:14 +0000 Received: by mail-yb1-xb2c.google.com with SMTP id z5so21034799ybj.2 for ; Sun, 26 Sep 2021 21:42:13 -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; bh=ri9dvMFG/x1cTklsSErYEsCdOKHoBen/gvdM4h35+2I=; b=VdAsky04knAT95kNKvkjSV3I5sqRy4F7r+47+AcnyrdPgwZA5h1qw7WK45gei2HldY 08YFAU0Yy1v2ekqnYfXQ7Oy0hGVjr24jcw/IGSihoWOwZ2m84VfQ0yl1V2GaQskICr25 EKNhAtzt3KPbNWe5t9hrxv35DwXl08gOdcpv/DYUWiO1gh1+PpXQSni0+eXMWflVnEBB BqtyhaBwbril8PnyUNIE8lt1QoQflgVkvVV4kZoLHAa2dzXGxRTqQe1j/Db2kXlWY+V9 pqFFsghpnwm13vGwWVW5cF//qtWWS5Hjkm4dbzjMqxgQngPmjNFEkuFrpD5NIR49pV3F skQQ== 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; bh=ri9dvMFG/x1cTklsSErYEsCdOKHoBen/gvdM4h35+2I=; b=hLkzqynUnbIZxq/CDuDjDrbL7+N6OSE8emyPr+eDNM2jJZzatrKxCMOmEayCfqck+F LsaRJMikWGS65vQIKb2OAY9cW/YjhFOGwhaL3MJYEXAcpjrLyGmPxC1w69sVKVUtZo/J kaMI04sQ5fQ1zftATfxKWd98uWtmjDGTB7eMrZPYQQXPp+7+yWD8IxX2cZffaDeRmLiQ /FGalNYiVwvp13gVZHPdLzf/zF0pscNdGXwrZXa0caDrqy2iA/addjtdhHbtdzAmPI// i9dRbgdzhTFzVIzAIR9UmvDE88bZwPNHHedXn+bAXoNcXYPofg0xI+MAL2DjSZ009JrU z2GQ== X-Gm-Message-State: AOAM533GWY1Nv24VNn0YFI/4YFdHTTQs+hlLqTbmQt0DSVKD0LQMRrAX HwjnG/kas/Su3L+jIdIRi1z1OqUAW2iQ0uuPTo0= X-Google-Smtp-Source: ABdhPJxmBaq1YMZz50/dBFnHmF3uARKw+x0XI7hSS0eNl2QMwRaevO+SHrLNwHxLG7PfNKgrhrJI/YqI03UE/zk9ALo= X-Received: by 2002:a25:cac8:: with SMTP id a191mr17328972ybg.74.1632717732563; Sun, 26 Sep 2021 21:42:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Mon, 27 Sep 2021 10:12:01 +0530 Message-ID: Subject: Re: Failed transaction statistics to measure the logical replication progress To: "osumi.takamichi@fujitsu.com" Cc: Masahiko Sawada , "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 Wed, Sep 22, 2021 at 10:10 AM osumi.takamichi@fujitsu.com wrote: > > Just conducted some cosmetic changes > and rebased my patch, using v14 patch-set in [1]. > IIUC, this proposal will allow new xact stats for subscriptions via pg_stat_subscription. One thing that is not clear to me in this patch is that why you choose a different way to store these stats than the existing stats in that view? AFAICS, the other existing stats are stored in-memory in LogicalRepWorker whereas these new stats are stored/fetched via stats collector means these will persist. Isn't it better to be consistent here? I am not sure which is a more appropriate way to store these stats and I would like to hear your and other's thoughts on that matter but it appears a bit awkward to me that some of the stats in the same view are persistent and others are in-memory. -- With Regards, Amit Kapila.