title: docker tmpfs seems to have no effect on postgresql
body: <p>I have a Postgres database inside a docker container against which I run django tests. I want to improve the speed of the tests. The easiest way to do this (it seems to me) is to move postgres data into tmpfs volume.</p>
  
  <p>Here's what I did:</p>
  
  <pre><code>docker run --name my_tfmps_test -d -p 5432:5432 \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=postgres \
  -e POSTGRES_DB=my_database \
  -e PGDATA=/var/lib/postgresql/data \
  --tmpfs /var/lib/postgresql/data \
  library/postgres
  </code></pre>
  
  <p>Because I specified <code>--tmpfs</code> I expect the tests run significantly faster. Unfortunately this is not the case. The speed of the tests remains exactly on the same level (give or take 5%).  </p>
  
  <p>My questions is: why did the speed of the tests did not change? And what can I do about it ?</p>
  
  <p>Extra info:</p>
  
  <ul>
  <li>MacOS 10.13.6</li>
  <li>reference <a href="https://docs.docker.com/storage/tmpfs/" rel="noreferrer">https://docs.docker.com/storage/tmpfs/</a></li>
  </ul>