title: How do I whitelist access to a PostgreSQL schema?
body: <p>I have a certain schema in a PG database that contains some very sensitive data. I'd like to prevent access to it for every role except one, but I can't figure it out from the documentation on permissions.</p>
  
  <p>To begin with, I figured I'd only give <code>CONNECT</code> access to that one special role, but then every other role can connect to the schema. To make things worse, every role can also <code>CREATE</code>, <code>DROP</code>, and do everything else.</p>
  
  <p>What have I missed?</p>
  
  <p>Side question: in time, this schema will be a streaming destination from another instance of postgresql. In short, we have a master db server that supports a live web site, and we need a secondary, read-only copy of it on another machine to perform some computationally intensive queries on. We figured that streaming was the answer. Does this make sense? Is it still possible to protect access to it?</p>
  
  <p>We are using version 9.5, in case this is relevant.</p>