title: What is the size limit of a TOAST table in PostgreSQL? 4 billion rows o 4 billions values of chunk_id?
body: <p>in the wiki for PostgreSQL related to TOASTed tables (<a href="https://wiki.postgresql.org/wiki/TOAST" rel="nofollow noreferrer">https://wiki.postgresql.org/wiki/TOAST</a>) says that:</p>
  
  <p>"You cannot have more than 2^32 (4 billion) out-of-line values in a single table, because there would have to be duplicated OIDs in its TOAST table."</p>
  
  <p>What does it mean?</p>
  
  <p>1) the TOAST table cannot have more than 4 billion rows? or</p>
  
  <p>2) the TOAST table cannot have more than 4 billion distinct values of OIDs (values for column chunk_id)?</p>
  
  <p>We have a toast table with 3.2 billion rows and wondering if we are close to the limits.</p>
  
  <p>Thanks in advance </p>