title: Postgres error invalid memory alloc request size
body: <p>I have a postgres database for my backend on a website. The website allows a user to upload a file of up to 1GB, but I've found that only file sizes of around 500MB are possible at the moment. </p>
  
  <p>When you try to upload a 1GB file, there is an error on the database side, below is the error log. Google searches for this error have people saying its due to a corrupted table, but I've tried with different files and different configurations and can't seem to make a 1GB file upload work. </p>
  
  <p>Is there a way to increase the memory alloc request size to avoid this error?</p>
  
  <p>Thanks!</p>
  
  <p>EDB postgres log:</p>
  
  <pre><code>Jun 28 05:01:40 udb1fo postgres[8291]: [57-1] 2016-06-28 05:01:40 EDT plf_jcr plf uweb1fo(56525) 8291 57723b77.2063 2016-06-28 04:55:19 EDTERROR:  XX000: invalid memory alloc request size 1133936643
  Jun 28 05:01:40 udb1fo postgres[8291]: [57-2] 2016-06-28 05:01:40 EDT plf_jcr plf uweb1fo(56525) 8291 57723b77.2063 2016-06-28 04:55:19 EDTLOCATION:  palloc, mcxt.c:664
  Jun 28 05:01:40 udb1fo postgres[8291]: [57-3] 2016-06-28 05:01:40 EDT plf_jcr plf uweb1fo(56525) 8291 57723b77.2063 2016-06-28 04:55:19 EDTSTATEMENT:  insert into JCR_SVALUE(DATA, ORDER_NUM, PROPERTY_ID, STORAGE_DESC) VALUES($1,$2,$3,$4)
  Jun 28 05:01:40 udb1fo postgres[8291]: [58-1] 2016-06-28 05:01:40 EDT plf_jcr plf uweb1fo(56525) 8291 57723b77.2063 2016-06-28 04:55:19 EDTERROR:  25P02: current transaction is aborted, commands ignored until end of transaction block
  </code></pre>
  
  <p>Platform (web) log:</p>
  
  <pre><code>Jun 28 06:28:15 uweb1fo exo-platform: Caused by: org.exoplatform.services.jcr.impl.storage.JCRInvalidItemStateException: [collaboration] ADD PROPERTY. Error of item add. []:1[]Groups:1[]spaces:1[]administration_community:1[]Documents:1[]distribution-2.1-bin (1).tar:1[http://www.jcp.org/jcr/1.0]content:1[http://www.jcp.org/jcr/1.0]data:1, ID: 968c5312ac1d1ca1032b68d6d07b8b47, ParentID: 968c5311ac1d1ca15749805d270795ee. Cause &gt;&gt;&gt;&gt; ERROR: invalid memory alloc request size 1133936643: ERROR: invalid memory alloc request size 1133936643
  </code></pre>