I was receiving warning messages of pgstat timeout.
I started looking for the solution for this problem and this doubt came out.
But it doesn't seem to be the problem.
Usually that just means that you are dirtying pages faster than your hard drives can write them out, leading to IO contention. Sometimes you can do something about this by changing the work-load to dirty pages in more compact regions, or by changing the configuration. Often the only effective thing you can do is buy more hard-drives.
Cheers,
Jeff
Would it help if I changed the checkpoint_completion_target to something close to 0.7 (mine is the default 0.5) or raise the checkpoint_segments (it is 32 now)?