pg_dump on Database throwing error 'out of shared memory'
<p>Getting problem when taking backup on database contains around 50 schema with each schema having around 100 tables.</p>

<p>pg_dump throwing below error suggesting that to increase <code>max_locks_per_transaction</code>.</p>

<pre><code>pg_dump: WARNING:  out of shared memory
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR:  out of shared memory
HINT:  You might need to increase max_locks_per_transaction.
pg_dump: The command was: SELECT tableoid, oid, prsname, prsnamespace, prsstart::oid, prstoken::oid, prsend::oid, prsheadline::oid, prslextype::oid FROM pg_ts_parser
</code></pre>

<p>An updated of <code>max_locks_per_transaction</code> to 256 in <code>postgresql.conf</code> did not solve the problem.</p>

<p>Are there any possibilities which can cause this problem?</p>

<p><strong>Edited:(07 May, 2016)</strong></p>

<p>Postgresql version = 9.1</p>

<p>Operating system = Ubuntu 14.04.2 LTS</p>

<p><code>shared_buffers</code> in <code>postgresql.conf</code> = 2GB</p>

<p><strong>Edited:(09 May, 2016)</strong></p>

<p>My postgres.conf</p>

<pre><code>maintenance_work_mem = 640MB
wal_buffers = 64MB
shared_buffers = 2GB
max_connections = 100
max_locks_per_transaction=10000
</code></pre>