0

The task was assigned to me to check the performance of uploads and query execution separately for "read replica" turned on and turned off.

Surprisingly when "read replica" was turned on the performance was better. Note that in both tests, made sure that DB is freshly refreshed.

Coming to HA in Postgres, I have verified that the process of archiving WAL logs is happening in DB irrespective of read replica enabled or disabled(I feel it is obvious based on the parameter). Now my question is how is enabling read replica improved the performance of DB activities as a whole. Also, checkpoint switching seems similar for both tests, can you put some light on this, please?

2
  • Do you think providing the details of how exactly you measure "performance of DB activities as a whole" might be useful?
    – mustaccio
    Feb 2, 2022 at 13:58
  • Sure. Basically, I have set up a cron job that runs 2 procedures. One procedure loads thousands of data in schema 1 in read committed transaction and another loads lacs(1/10 million) of data in schema 2 in the serializable transaction. Each procedure might take 10 to 15 minutes and runs continuously. When I say "load", it takes care of updates, inserts, and deletes as well, procedure makes use of temp tables, triggers etc. Feb 3, 2022 at 6:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.