title: How to read the readonly status on psycopg2?
body: <p>On <code>psycopg2</code>, I can put the connection on read only mode with: </p>
  
  <pre><code>connection.set_session(readonly=True)
  </code></pre>
  
  <p>But how do I know if the connection is in read-only mode?</p>