It depends on how you trigger readonly mode.
https://github.com/discourse/discourse/blob/master/lib/discourse.rb#L291-L295
There is a list of keys that you can pass to Postgres depending on how you trigger it
https://github.com/discourse/discourse/blob/master/lib/discourse.rb#L256-L259