On 11/23/2016 12:24 PM, Michael Paquier wrote:
On Wed, Nov 23, 2016 at 6:15 PM, Magnus Hagander <mag...@hagander.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


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to