I am running Postgresql 11
in production and observing a weird step function kind of thing in storage as follow:
The above graph is for a single day and it is happening everyday at random times. I have checked and there are no bulk inserts from our side. Also, these steps are weird because storage again comes back to its normal value after some time.
I also have read replica and because of this, there is sudden increase in disk usage of read replica which results in high replication times of around 30s, which in further results in conflict with recovery
problem. Is there a way to deal with this? Is this common behaviour of Postgres
. I am running postgresql on Google Cloud SQL and it has been happening for a long time but I observed today, so I am wondering is it a normal thing or do I need to check something?
One suspicion I have is that it might be because of vaccumm but I am not sure? Please help me with this.
Edit 1:
There are spikes like below whenever this occur for read/write io. Red is the write one and blue is the read one
pg_stat_archiver
report oddities?pg_stat_archiver
status and problem? Is it there in logs. Since, I am using managed service, I generally don't have access to everything.