title: How much shared memory does Postgresql need per max_locks_per_transaction?
body: <p>I have a Postgresql 10 database with about 300k tables in 23k schemas. I am trying to upgrade to Postgresql 13 using pg_upgradecluster. This is failing while attempting dump all the schemas:</p>
  <pre><code>pg_dump: error: query failed: ERROR:  out of shared memory
  HINT:  You might need to increase max_locks_per_transaction.
  pg_dump: error: query was: LOCK TABLE &quot;a45119740&quot;.&quot;activity_hrc&quot; IN ACCESS SHARE MODE
  </code></pre>
  <p>Is setting max_locks_per_transaction to 300k something that can be done? I haven't be able to find anything explaining how much shared memory this might need. The machine has 64G of RAM.</p>
  <p>(I understand that I need to change my db design .. I have been backing up one schema at a time until now so wasn't aware of this problem)</p>