Postgresql – Increase in number of temp files being generated after increasing checkpoint_timeout

amazon-rdspostgresqlpostgresql-9.6

I have pgbadger set up to analyze the log files from my postgres db. I recently changed a couple of parameters in my postgres config.

I changed the checkpoint_timeout from the default value of 300 to 1800, i.e. checkpoints are triggered every 30 mins instead of every 5 mins.
I also changed the the autovacuum_scale_factor from 0.3 to 0.1 and autovacuum_threshold from 100 to 10000.

I can see in pgbadger analysis of the log files that autovacuuming is happening slightly more often and checkpoints are triggering every 30 minutes. However, I also see a change in the graph of temp files being created. After this change, more number of tempfiles are being created.

Isn't that a bad thing? Why is that happening and should I be worried?

Best Answer

Using temp files is not necessarily a bad thing. They are nothing to worry about unless the queries that have started using them have gotten slower, or the amount of them that exist simultaneously is threatening to fill up your storage. The change to autovacuum setting is more likely to be the cause than the change to the checkpoint setting.

What lead you to make these changes in the first place? That could provide a clue.