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 1mxTlK-0003gw-C9 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Dec 2021 12:52:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mxTlJ-0002i2-60 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Dec 2021 12:52:01 +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 1mxTlI-0002hs-SN for pgsql-hackers@lists.postgresql.org; Wed, 15 Dec 2021 12:52:00 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mxTlG-0001Gr-9Z for pgsql-hackers@lists.postgresql.org; Wed, 15 Dec 2021 12:51:59 +0000 Received: by mail-wm1-x329.google.com with SMTP id z8-20020a05600c220800b0034565e837b6so1068824wml.1 for ; Wed, 15 Dec 2021 04:51:58 -0800 (PST) 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=gm98vC8Gwv0GUNScOvr1UsVlUufil9s1cSh5H2oz8qA=; b=G+Zy6MmVfeCltdIMcugqQSjWMlPox8CZnm9tLqaGxaviXhAwxaocy72hsvMM2O56Bg QcPTo4sKzwnYdnULF2cZUcRjsp6qjGomGxAqap7swkE9SqpM7rcQUxAELSpVQ1UPoM9g XWB8lEAwKa1UxnVb37d92GwbvCDpvq7nKYUnvL2Ev4NW7kRWDVAOs8ShDU5sw+2gT5r9 Fc+Kl0z+3OzDbcojNr8ZxVR3S+shDgNppj97SAM2ISf/aQZM2Egneu7miY+K5uzSiXSB ew/4uRlundmOEDfQSEd1ZdbH4LxEuNtNSWTVPuIjG5S4dnw7lE+qaRMm8rLO2qx0cvdg IVNg== 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=gm98vC8Gwv0GUNScOvr1UsVlUufil9s1cSh5H2oz8qA=; b=neS257867zjfVTYrZL7bgovumacisXSW+iTU6GkhUgCih0WuYakALuYVOg5G1votD4 R7ekDVBh2VZoYW+gWGBYeasHT0hopMTCMY+4TQImhA/HCB/54+WVP7W6K22+iaNdrVqg +6Bn5klDF0xYZCMmcHCwB/gCtZEZ3hzAKFoiKuG1bfRJqvLBjLfibqrWItyKT4hll9Yq dO/5/7pZcEe7+CkyJR9SRrScD0gy/nZqpHMykLnY4TsB+T8eKoDDMeimbm7TGPcgeQx6 TFpaugzNWkuHDbALiqipeIGYTuyZaKAE7nffywjqDtHKLIxuMGnzOaQ8irKgo2aPU6nK /c6w== X-Gm-Message-State: AOAM530NHUbXwAaOh2GB5WRkUP901zkRn1FEoH4flFby/32Z+V96VrEU kVLOKgxFpC/QxVn4O+OZZC6UfwJDRArdwyGxA4I= X-Google-Smtp-Source: ABdhPJypSiB5KLUzVUorvi76M6G6/nCn/X71ySyGKQLFPgQVr5inJhDeZn39PqHJVkIwqEbypFv7Gjy3JKyYxsumNVA= X-Received: by 2002:a7b:c5cc:: with SMTP id n12mr4235368wmk.162.1639572716590; Wed, 15 Dec 2021 04:51:56 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: vignesh C Date: Wed, 15 Dec 2021 18:21:44 +0530 Message-ID: Subject: Re: Failed transaction statistics to measure the logical replication progress To: Amit Kapila Cc: "osumi.takamichi@fujitsu.com" , Masahiko Sawada , Greg Nancarrow , "houzj.fnst@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, Dec 14, 2021 at 7:58 AM Amit Kapila wrote: > > On Mon, Dec 13, 2021 at 5:48 PM osumi.takamichi@fujitsu.com > wrote: > > > > On Monday, December 13, 2021 6:19 PM Amit Kapila wrote: > > > On Tue, Dec 7, 2021 at 3:12 PM osumi.takamichi@fujitsu.com > > > wrote: > > > > > > Few questions and comments: > > Thank you for your comments ! > > > > > ======================== > > > 1. > > > The pg_stat_subscription_workers view will > > > contain > > > one row per subscription worker on which errors have occurred, for workers > > > applying logical replication changes and workers handling the initial data > > > - copy of the subscribed tables. The statistics entry is removed when the > > > - corresponding subscription is dropped. > > > + copy of the subscribed tables. Also, the row corresponding to the apply > > > + worker shows all transaction statistics of both types of workers on the > > > + subscription. The statistics entry is removed when the corresponding > > > + subscription is dropped. > > > > > > Why did you choose to show stats for both types of workers in one row? > > This is because if we have hundreds or thousands of tables for table sync, > > we need to create many entries to cover them and store the entries for all tables. > > > > If we fear a large number of entries for such workers then won't it be > better to show the value of these stats only for apply workers. I > think normally the table sync workers perform only copy operation or > maybe a fixed number of xacts, so, one might not be interested in the > transaction stats of these workers. I find merging only specific stats > of two different types of workers confusing. > > What do others think about this? We can remove the table sync workers transaction stats count to avoid confusion, take care of the documentation changes too accordingly. Regards, Vignesh