Re: Resetting spilled txn statistics in pg_stat_replication

From: Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Resetting spilled txn statistics in pg_stat_replication
Date: 2020-07-10 01:49:13
Message-ID: CA+fd4k7MABn621VgHtqeqA3jLdyY6eekSVfTPLZr_kkYDaqxyA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 9 Jul 2020 at 16:09, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Tue, Jul 7, 2020 at 2:20 PM Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> >
> > On Tue, Jul 7, 2020 at 5:10 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >>
> >> > > I think it depends on the final patch. My initial thought was that we
> >> > > should do this for PG14 but if you are suggesting removing the changes
> >> > > done by commit 9290ad198b1 then we need to think over it. I could
> >> > > think of below options:
> >> > > a. Revert 9290ad198b1 and introduce stats for spilling in PG14. We
> >> > > were anyway having spilling without any work in PG13 but didn’t have
> >> > > stats.
> >> > > b. Try to get your patch in PG13 if we can, otherwise, revert the
> >> > > feature 9290ad198b1.
> >> > > c. Get whatever we have in commit 9290ad198b1 for PG13 and
> >> > > additionally have what we are discussing here for PG14. This means
> >> > > that spilled stats at slot level will be available in PG14 via
> >> > > pg_stat_replication_slots and for individual WAL senders it will be
> >> > > available via pg_stat_replication both in PG13 and PG14. Even if we
> >> > > can get your patch in PG13, we can still keep those in
> >> > > pg_stat_replication.
> >> > > d. Get whatever we have in commit 9290ad198b1 for PG13 and change it
> >> > > for PG14. I don't think this will be a popular approach.
> >> >
> >> > I was thinking option (a) or (b). I'm inclined to option (a) since the
> >> > PoC patch added a certain amount of new codes. I agree with you that
> >> > it depends on the final patch.
> >> >
> >>
> >> Magnus, Tomas, others, do you have any suggestions on the above
> >> options or let us know if you have any other option in mind?
> >>
> >
> > I have a feeling it's far too late for (b) at this time. Regardless of the size of the patch, it feels that this can end up being a rushed and not thought-through-all-the-way one, in which case we may end up in an even worse position.
> >
> > Much as I would like to have these stats earlier, I'm also leaning towards (a).
> >
>
> Fair enough. The attached patch reverts the commits related to these
> stats. Sawada-San, can you please once see if I have missed anything
> apart from catversion bump which I will do before commit?

Thank you for the patch!

Do we remove the corresponding line in the release note by another
commit? For the rest, the looks good to me.

Regards,

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2020-07-10 01:53:00 Re: Resetting spilled txn statistics in pg_stat_replication
Previous Message torikoshia 2020-07-10 01:49:11 Re: Is it useful to record whether plans are generic or custom?