> These stats are not stored in tables, only in memory and saved to a > special file on disk to be able to preserve it across server > stop/start. > But pg_dump does not make the slightest attempt to save it. > > Also, you can't save it yourself -- while you could save the values it > returns on queries to the stats views, there is no way to feed those > saved values back to the system after a dump/restore.
Thanks! Sounds like I just need to query the stats tables and save the output for oofline analysis before I do a dump. Based on how it works it seems that a server crash might lose the in-memory stats data as well? I imagine PITR does not take care of that special file (where is it by, by the way?). I have not worked with replication (yet), but I imagine replica databases will also be agnostic of the master's stats? ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match