Postgres for maximum performance requires a sufficient amount of cache to save the most frequently used object (indexes, tables). Thus, in setting shared_buffers there is a tipping point. After this point, increasing shared buffers doesn't help much.
It is good to leave some of the RAM for caching at the file system level.
See http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server for more details.
As for memcache, this is a completely different beast ... It can be used directly from the application to have ultrafast storage with unchanged key storage.
All three properties make memcached different from a relational database (RDB).
- ultrafast (RDB - no)
- intermittent (RDB)
- key-value only (RDB is much better)
source share