RE: Design of pg_stat_subscription_workers vs pgstats

From: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Design of pg_stat_subscription_workers vs pgstats
Date: 2022-02-24 07:20:49
Message-ID: OS0PR01MB6113769B17E90ADC9ACA14B2FB3D9@OS0PR01MB6113.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 24, 2022 9:33 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> Thank you for the comments! I've attached the latest version patch
> that incorporated all comments I got so far. The primary change from
> the previous version is that the subscription statistics live globally
> rather than per-database.
>

Thanks for updating the patch.

Few comments:

1.
I think we should add some doc for column stats_reset in pg_stat_subscription_activity view.

2.
+CREATE VIEW pg_stat_subscription_activity AS
SELECT
- w.subid,
+ a.subid,
s.subname,
...
+ a.apply_error_count,
+ a.sync_error_count,
+ a.stats_reset
+ FROM pg_subscription as s,
+ pg_stat_get_subscription_activity(oid) as a;

The line "a.stats_reset" uses a Tab, and we'd better use spaces here.

Regards,
Tang

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-02-24 07:26:42 Re: [BUG] Panic due to incorrect missingContrecPtr after promotion
Previous Message Amit Kapila 2022-02-24 07:05:17 Re: speed up a logical replica setup