Re: tuple statistics update

From: Tom DalPozzo <t(dot)dalpozzo(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: tuple statistics update
Date: 2017-04-26 09:06:11
Message-ID: CAK77FCQRJzzS_PerYRvv=CypXwE+5mzey6Cp3VF-JB_=_VR9ug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

2017-04-19 16:37 GMT+02:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> Tom DalPozzo <t(dot)dalpozzo(at)gmail(dot)com> writes:
> > 2017-04-18 22:06 GMT+02:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> >> If your session is just sitting, that's not surprising. I think stats
> >> updates are only transmitted to the collector at transaction end (and
> >> even then, only if it's been at least N msec since the last transmission
> >> from the current session).
>
> > Hi, my transaction ended, that I waited 1 min and queried the stat.
> > I had to wait for session end in order to see the updeted stats.
> > Did you mean "...to the collector at SESSION end"?
>
> No, I meant what I said. No amount of just-sitting will cause a session
> to do something: it either transmits stats at transaction end or it
> doesn't because it thinks it's too soon since its last update. If you
> want to force out the stats, you could wait a second or so and then
> do a dummy transaction (even "select 1" will do, in testing).
>
> BTW, a quick look at the code says the threshold is 500 msec, ie,
> stats are sent only if it's been at least half a second since the
> session's last report.
>

I tried with a dummy select with no success. I detailed my test in my
answer to Adrian Klaver.
I'll avoid to duplicate it here.
Regards
Pupillo

>
> regards, tom lane
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lifepillar 2017-04-26 09:47:35 Re: [OT] Help: stories of database security and privacy
Previous Message Tom DalPozzo 2017-04-26 09:03:29 Re: tuple statistics update