Search Postgresql Archives

Re: bytea

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 11 May 2004, Dennis Gearon wrote:

> Thanks for all the answers everybody, but I need to know also an answer 
> to the other question:
> 
> Does the bytea make its own files automatically for large objects?

Bytea doesn't use large objects, which are kind of an artifact left over 
from the days of the 8k row limit.  They use what are called "toast" 
tables.  Toast tables allow for text/varchar/bytea types to overflow from 
the base table as needed to occupy up to ~2 gigabytes of drive space per 
field max.  Note that I'm pretty sure no one's really tried to put 2 gig 
in one field, as that would probably take quite some time, and I'm not 
sure how well most clients are gonna handle getting back a row with a 2 
gig field in it. :-)

And yes, toasting is fully automatic.  Just insert a large 
text/varchar/bytea field and the database does the rest.  which is why 
they are generally recommended over using large objects, which require 
specialized handling.

> Also, how about backups with tables having bytea columns.?

Just like any other field.  pg_dump will escape them as needed to make a 
usable backup.



---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux