Why reset pgstat during recovery

Started by 蔡梦娟(玊于)almost 5 years ago2 messages
#1蔡梦娟(玊于)
mengjuan.cmj@alibaba-inc.com

Hi, all

I want to know why call pgstat_reset_all function during recovery process, under what circumstances the data will be invalid after recovery?

Thanks & Best Regard

#2Masahiro Ikeda
ikedamsh@oss.nttdata.com
In reply to: 蔡梦娟(玊于) (#1)
Re: Why reset pgstat during recovery



On 2021/04/02 18:41, 蔡梦娟(玊于) wrote:

Hi, all

I want to know why call pgstat_reset_all function during recovery
process, under what circumstances the data will be invalid after recovery?

If my understanding is right, PITR is the case. Now, the stats files are
generated as a one-time snapshot. This means that the stats counters
saved at last may not be valid for the specific point in time.

FWIW, there was a related discussion([1]/messages/by-id/1416.1479760254@sss.pgh.pa.us) although the behavior is not
changed yet.

[1]: /messages/by-id/1416.1479760254@sss.pgh.pa.us

Regards,
--
Masahiro Ikeda
NTT DATA CORPORATION