Re: Resetting spilled txn statistics in pg_stat_replication

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: Resetting spilled txn statistics in pg_stat_replication
Дата
Msg-id CA+fd4k5PHg6qboUjmPR_=WccbROJP4i377FFZCA17cRjnT691A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Resetting spilled txn statistics in pg_stat_replication  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Resetting spilled txn statistics in pg_stat_replication  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Thu, 8 Oct 2020 at 17:59, Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Thu, Oct 8, 2020 at 1:55 PM Masahiko Sawada
> <masahiko.sawada@2ndquadrant.com> wrote:
> >
> > On Thu, 8 Oct 2020 at 14:10, Amit Kapila <amit.kapila16@gmail.com> wrote:
> > >
> > >
> > > We can write if we want but there are few things we need to do for
> > > that like maybe a new function like wait_for_spill_stats which will
> > > check if the counters have become zero. Then probably call a reset
> > > function, call a new wait function, and then again check stats to
> > > ensure they are reset to 0.
> >
> > Yes.
> >
>
> I am not sure if it is worth but probably it is not a bad idea
> especially if we extend the existing tests based on your below idea?
>
> > > We can't write any advanced test which means reset the existing stats
> > > perform some tests and again check stats because *slot_get_changes()
> > > function can start from the previous WAL for which we have covered the
> > > stats. We might write that if we can somehow track the WAL positions
> > > from the previous test. I am not sure if we want to go there.
> >
> > Can we use pg_logical_slot_peek_changes() instead to decode the same
> > transactions multiple times?
> >
>
> I think this will do the trick. If we want to go there then I suggest
> we can have a separate regression test file in test_decoding with name
> as decoding_stats, stats, or something like that. We can later add the
> tests related to streaming stats in that file as well.
>

Agreed.

I've updated the patch. Please review it.

Regards,

-- 
Masahiko Sawada            http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: powerpc pg_atomic_compare_exchange_u32_impl: error: comparison of integer expressions of different signedness (Re: pgsql: For all ppc compilers, implement compare_exchange and) fetch_add
Следующее
От: Greg Nancarrow
Дата:
Сообщение: Re: Parallel INSERT (INTO ... SELECT ...)