title: postgres ip difference between pg_hba.conf and postgresql.conf
body: <p>(I have a basic understanding of networking)</p>
  
  <p>So I read in another post that explains that listen_addresses just involves an extra layer of security before the login: <a href="https://stackoverflow.com/questions/9764126/how-to-configure-postgresql-postgresql-conf-listen-addresses-for-multiple-ip-add">How to configure postgresql postgresql.conf listen_addresses for multiple ip addresses</a></p>
  
  <p><strong>But what I want to know is why listen_address doesn't have to be put in CIDR format for the ips you put in there.</strong></p>
  
  <p>in <code>pg_hba.conf</code> it's <code>##.##.##.##/##</code> for CIDR format. So why does <code>postgresql.conf</code>'s <code>listen_addresses</code> use just the ip and without the subnet mask? (and also, I put my public ip address for both but access isn't allowed if I put it in <code>listen_address</code> which means...?</p>
  
  <p>Side question (maybe for subnet):
  amazon ec2 doesn't let me use my public ip address/24, it has to be /32 (saying the size is too small) but i put /24 in <code>pg_hba.conf</code> so clearly it's valid?</p>