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 1mVSdR-0001jh-Il for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Sep 2021 06:00:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mVScu-00055s-UP for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Sep 2021 05:59:32 +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 1mVScu-00055k-Ka for pgsql-hackers@lists.postgresql.org; Wed, 29 Sep 2021 05:59:32 +0000 Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mVScs-00074p-FI for pgsql-hackers@lists.postgresql.org; Wed, 29 Sep 2021 05:59:32 +0000 Received: by mail-yb1-xb30.google.com with SMTP id i84so2811634ybc.12 for ; Tue, 28 Sep 2021 22:59:30 -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=7M/euQawa2D/uEoll5pus7ZujNKStZsPu4l5MF2ulh0=; b=qJyOV3jrl5e+QTmmxVpDP9gUzdF/n3G1sNB1y416rdM7x4GJW2qXc7CB3PiqqRWEXg YC7NW+zJhKzX4P/KHQ6wEEWujZQ2UArfaFcpZgvzwI2WymUcwGCU7XmQM4J5x/noBy7n AkYeypyBHKc5z+AnXLHDJwuOieHElutojLYxnGBQA1VKfBZRwb+xxdImu7FCjVMSu7AV djQo8zeU9yfgbxmKKYumSyiyeW0uq/4ZImmhKrlIXSgL+YsPBAtRlLw0IWE4QeIqHtCh g6VXnzBUuUS6HiZ+wAMFiJKDc/lSXEj4gqoS0W947ROqYkYLYvlPdlghnSfCrM9tZaYC 3ptg== 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=7M/euQawa2D/uEoll5pus7ZujNKStZsPu4l5MF2ulh0=; b=II2ZufOmMc/Bkx6SWQfV8H+DxbqjPgGKn09P61SiCYFdBNkwiyutEEbtjvP4dLNrY7 Qg+XXQLNg3MVFd1cgSRA/M9VFDW1gXalL501iv1v1wMy29TuhlORmj8FgkxaXPwpBkch 3TfPIvXQje21ylrvcJTmO0rAwfh0K9b4tZlhTYm62gEXemJhOlE00c8D+i1zxABQDIhp JaFgxLTSqhuKov/s7jbk9iUlMPFrIWgbuC1okp1pimiH7ItohO/dvUEiWbYEdDyPg5Aq 3V/mRHRUA9PeZ5P9ycrx0+P1EUFzQOf1r3IezwCILopsIZN9jLrkjPYEDZwhY0bpABt8 eUWQ== X-Gm-Message-State: AOAM533kilwOh1vNiGZzXB6ODO1pjHvXFjGmeZYI7U/RVhawZnRVqx0Y vhGbP4d/O51aCEixdV15OrTQYsZ6T2WO0Qg7Aug= X-Google-Smtp-Source: ABdhPJxkyfF0UY2h816NnC9ms+jI7vraQvIWFbY3gNA2Jm9LVFHhhU+YqjOgSA4m1hi/pQuP32MPTlYLb51Z5NmnXa4= X-Received: by 2002:a25:6185:: with SMTP id v127mr723003ybb.151.1632895167982; Tue, 28 Sep 2021 22:59:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Greg Nancarrow Date: Wed, 29 Sep 2021 15:59:20 +1000 Message-ID: Subject: Re: Failed transaction statistics to measure the logical replication progress To: Amit Kapila Cc: Masahiko Sawada , "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, Sep 28, 2021 at 8:04 PM Amit Kapila wrote: > > > Another idea could be to have a separate > > view, say pg_stat_subscription_xact but I'm not sure it's a better > > idea. > > > > Yeah, that is another idea but I am afraid that having three different > views for subscription stats will be too much. I think it would be > better if we can display these additional stats via the existing view > pg_stat_subscription or the new view pg_stat_subscription_errors (or > whatever name we want to give it). > It seems that we have come full-circle in the discussion of how these new stats could be best added. Other than adding a new "pg_stats_subscription_xact" view (which Amit thought would result in too many views) I don't see any clear solution here, because the new xact-related cumulative stats don't really consistently integrate with the existing in-memory stats in pg_stat_subscription, and IMHO the new stats wouldn't integrate well into the existing error-related stats in the "pg_stat_subscription_errors" view (even if its name was changed, that view in any case maintains lowel-level error details and the way error entries are removed doesn't allow the "success" stats to be maintained for the subscription and doesn't fit well with the added "pg_stat_reset_subscription_error" function either). If we can't really add another view like "pg_stats_subscription_xact", it seems we need to find some way the new stats fit more consistently into the existing "pg_stat_subscription" view. Regards, Greg Nancarrow Fujitsu Australia