Reads causing writes in Postgres

It is good practice to regularly inspect the statements running in the hot path of your Postgres instance. One way to do this is to examine the pg_stat_statements view , which shows various statistics about the SQL statements executed by the Postgres server. Among many other interesting columns, you will find the shared_blks_dirtied and shared_blks_written columns. They keep track of how many…