Re: [PATCH] Make sure all statistics is sent after a few DML are performed

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Make sure all statistics is sent after a few DML are performed
Date: 2017-07-18 13:50:01
Message-ID: 20170718135001.svwzpt37rgwirqqm@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2017-07-18 09:42:31 -0400, Tom Lane wrote:
> I wonder if a better answer wouldn't be to reduce PGSTAT_STAT_INTERVAL.
> I don't think that value has been reconsidered since the code was written,
> circa turn of the century. Maybe even make it configurable, though that
> could be overkill.

Not sure if that really does that much to solve the concern. Another,
pretty half-baked, approach would be to add a procsignal triggering idle
backends to send stats, and send that to all idle backends when querying
stats. We could even publish the number of outstanding stats updates in
PGXACT or such, without any locking, and send it only to those that have
outstanding ones.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2017-07-18 13:55:36 Re: Patch: Add --no-comments to skip COMMENTs with pg_dump
Previous Message Tom Lane 2017-07-18 13:42:31 Re: [PATCH] Make sure all statistics is sent after a few DML are performed