From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [RFC] Should we fix postmaster to avoid slow shutdown? |
Date: | 2016-11-23 15:12:02 |
Message-ID: | 53728f0c-d8e4-a3d5-8837-7a885bd16b44@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11/23/2016 12:24 PM, Michael Paquier wrote:
> On Wed, Nov 23, 2016 at 6:15 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>> There's also the consideration of what to do with stats *on the standby*. If
>> we WAL log the stats file, then when it replays onthe standby, the stats
>> there will be overwritten. And stats like number of index vs seq scans on
>> the standby are still interesting and would be lost.
>
> Perhaps it would make sense to separate the stat files by type then?
> The action taken for each file depends on its type.
>
That seems reasonable. There are two types of stats - usage statistics
(number of index scans etc.), which we probably don't need on standby,
and statistics that we use to drive autovacuum.
This would also reduce the amount of data that we need to write to WAL,
although I'm not sure the amount is actually a problem. I've seen
instances with ~500MB stat files, but those were instances with hundreds
of databases, each with many thousands of objects.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-11-23 15:26:29 | Re: Patch to implement pg_current_logfile() function |
Previous Message | Robert Haas | 2016-11-23 15:03:17 | Re: UNDO and in-place update |