Re: Resetting spilled txn statistics in pg_stat_replication

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, 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-10-27 03:21:01
Message-ID: 20201027032101.GD9241@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 23, 2020 at 10:45:34AM +0530, Amit Kapila wrote:
> On Fri, Oct 23, 2020 at 8:59 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Fri, Oct 23, 2020 at 7:42 AM Masahiko Sawada
> > <masahiko(dot)sawada(at)2ndquadrant(dot)com> wrote:
> > >
> > > On Thu, 22 Oct 2020 at 20:34, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > > >
> > > > > > I have modified the description of spill_count and spill_txns to make
> > > > > > things clear. Any suggestions?
> > > > >
> > > > > Thank you for the patch.
> > > > >
> > > > > - logical decoding exceeds
> > > > > <literal>logical_decoding_work_mem</literal>. The
> > > > > - counter gets incremented both for toplevel transactions and
> > > > > - subtransactions.
> > > > > + logical decoding of changes from WAL for this exceeds
> > > > > + <literal>logical_decoding_work_mem</literal>. The counter gets
> > > > > + incremented both for toplevel transactions and subtransactions.
> > > > >
> > > > > What is the word "this" in the above change referring to?
> > > > >
> > > >
> > > > 'slot'. The word *slot* is missing in the sentence.
> > > >
> > > > > How about
> > > > > something like:
> > > > >
> > > >
> > > > > Number of transactions spilled to disk after the memory used by
> > > > > logical decoding of changes from WAL exceeding
> > > > > logical_decoding_work_mem. The counter gets incremented both for
> > > > > toplevel transactions and subtransactions.
> > > > >
> > > >
> > > > /exceeding/exceeds. I am fine with your proposed text as well but if
> > > > you like the above after correction that would be better because it
> > > > would be more close to spill_count description.
> > >
> > > yeah, I agree with the correction.
> > >
> >
> > Okay, thanks, attached is an updated patch.
> >
>
> While updating the streaming stats patch, it occurred to me that we
> can write a better description spill_bytes as well. Attached contains
> the update to spill_bytes description.

+ This and other spill
+ counters can be used to gauge the I/O occurred during logical decoding
+ and accordingly can tune <literal>logical_decoding_work_mem</literal>.

"gauge the IO occurred" is wrong.
Either: I/O *which* occured, or I/O occurring, or occurs.

"can tune" should say "allow tuning".

Like:
+ This and other spill
+ counters can be used to gauge the I/O which occurs during logical decoding
+ and accordingly allow tuning of <literal>logical_decoding_work_mem</literal>.

- Number of times transactions were spilled to disk. Transactions
+ Number of times transactions were spilled to disk while performing
+ decoding of changes from WAL for this slot. Transactions

What about: "..while decoding changes.." (remove "performing" and "of").

--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2020-10-27 03:22:50 Re: Autovacuum on partitioned table (autoanalyze)
Previous Message Bruce Momjian 2020-10-27 02:17:19 Re: pg_upgrade: fail early if a tablespace dir already exists for new cluster version