title: How to limit the memory that is available for PostgreSQL server?
body: <p>For an academic experiment I need to <strong>restrict the total amount of memory that is available for a pgSQL server</strong> to compute a given set of queries.</p>
  <p>I know that I can do this through <code>postgresql.conf</code> file, where I can adjust some parameters related with Resource Management.</p>
  <p>The problem is that: it's not clear for me--given the several parameters available on the config file--which is the parameter that I should change.</p>
  <p>When I first opened the config file I'm expecting someting like this: <code>max_server_memmory</code>. Instead I found a lot of: <code>shared_buffers</code>, <code>temp_buffers</code>, <code>work_mem</code>, and so on...</p>
  <p>Given that, I've consulted <a href="http://www.postgresql.org/docs/9.3/static/runtime-config-resource.html" rel="nofollow noreferrer">pgSQL docs. on Resource Consumption</a> and I come up with the <code>shared_buffers</code> as the best candidate for what I'm looking for: <strong>the parameter that restricts the total amount of memory that a pgSQL server can use to perform its computation</strong>. But I'm not completely sure about this.</p>
  <p>Can you guys give me some insight about which parameters should I adjust to restrict the pgSQL server's memory, please?</p>