Re: Resetting spilled txn statistics in pg_stat_replication

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Resetting spilled txn statistics in pg_stat_replication
Дата
Msg-id CAA4eK1+kctKn6vJ6w1DJ-D5Q0Dafz4Np48hzmoaUned0PBsVpA@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
Список pgsql-hackers
On Sat, Sep 19, 2020 at 1:48 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Tue, Sep 8, 2020 at 7:02 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > On Tue, Sep 8, 2020 at 7:53 AM Masahiko Sawada
> > <masahiko.sawada@2ndquadrant.com> wrote:
>
> I have fixed these review comments in the attached patch.
>
>
> Apart from the above,
> (a) fixed one bug in ReorderBufferSerializeTXN() where we were
> updating the stats even when we have not spilled anything.
> (b) made changes in pgstat_read_db_statsfile_timestamp to return false
> when the replication slot entry is corrupt.
> (c) move the declaration and definitions in pgstat.c to make them
> consistent with existing code
> (d) made another couple of cosmetic fixes and changed a few comments
> (e) Tested the patch by using a guc which allows spilling all the
> changes. See v4-0001-guc-always-spill
>

I have found a way to write the test case for this patch. This is
based on the idea we used in stats.sql. As of now, I have kept the
test as a separate patch. We can decide to commit the test part
separately as it is slightly timing dependent but OTOH as it is based
on existing logic in stats.sql so there shouldn't be much problem. I
have not changed anything apart from the test patch in this version.
Note that the first patch is just a debugging kind of tool to test the
patch.

Thoughts?

-- 
With Regards,
Amit Kapila.

Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.
Следующее
От: Ashutosh Sharma
Дата:
Сообщение: Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.