Jeison Bedoya <jeisonb@audifarma.com.co> wrote:
> memory ram: 128 GB
> cores: 32
>
> max_connections: 900
> temp_buffers = 512MB
In addition to the other comments, be aware that temp_buffers is
the limit of how much RAM *each connection* can acquire to avoid
writing temporary table data to disk. Once allocated to a
connection, it will be reserved for that use on that connection
until the connection closes. So temp_buffers could lock down 450
GB of RAM even while all connections are idle. If the maximum
connections become active, and they average one work_mem allocation
apiece, that's an *additional* 900 GB of RAM which would be needed
to avoid problems.
Reducing connections through a pooler is strongly indicated, and
you may still need to reduce work_mem or temp_buffers.
http://wiki.postgresql.org/wiki/Number_Of_Database_Connections
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company