title: Postgres foreign data wrapper between RDS databases
body: <p>I have two Postgres databases in Amazon RDS that I'd like to be able to perform joins between. I followed the instructions <a href="https://www.postgresql.org/docs/9.5/static/postgres-fdw.html" rel="nofollow" title="instructions">here</a> for creating a foreign table from one into the other. Everything seemed to work fine, but when I run a simple query like <code>select count(*) from table_in_other_db</code> I get:</p>
  
  <pre><code>ERROR:  could not connect to server "broad"
  DETAIL:  could not connect to server: Connection timed out
  </code></pre>
  
  <p>Both of these databases are in the same security group and I can access them individually. I even tried adding the security group to its own inbound rules on port 5432. Can anyone think of why else this wouldn't work?</p>