From: | Joe Conway <jconway(at)cox(dot)net> |
---|---|
To: | Jan Wieck <janwieck(at)yahoo(dot)com> |
Cc: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: tuptoaster.c must *not* use SnapshotAny |
Date: | 2002-01-18 06:36:09 |
Message-ID: | 3C47C259.1050508@cox.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jan Wieck wrote:
>
> Any datatype that has the potential to be loaded into memory
> entirely by the backend is dangerous. It leads to problems
> like "out of swapspace", which aren't really funny in
> production.
>
> We need something that is restricted to streaming access
> only. Yet, it needs to have copy semantics.
>
> That means to me, that this will not only be a new datatype,
> but some more infrastructure too. We need INSERT ...
> RETURNING ... where the values for BLOBs are given as
> NEW_BLOB() and the returned identifier is subsequently used
> to open the created BLOBs for writing and pump the data in.
>
> We need heap access level tuple support to duplicate those
> values on INSERT ... SELECT, to remove them on DELETE and to
> manipulate them on UPDATE.
>
> We need new functionality in procedural languages to support
> streaming in and out of these guy's, where the actual data is
> buffered in temp files and only blob identifiers passed
> around.
>
> I see the final storage of blob data to happen in the toast
> table, sliced, diced and handy (most probably not
> compressed). But I don't see an easy way to abuse the bytea
> datatype for real blob support.
>
All this may be needed for BLOBs that are *huge*, but there are at least
two classes of BLOB data that are not typically huge in practice. One is
encrypted or hashed data, the other is image data for web pages. Either
of these work very well with the current bytea support.
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Warner | 2002-01-18 06:42:51 | Re: Bug in pg_dump/restore -o |
Previous Message | Bruce Momjian | 2002-01-18 06:31:49 | Re: Bug in pg_dump/restore -o |