Re: Question about todo item - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Question about todo item
Date
Msg-id 1348.997278330@sss.pgh.pa.us
Whole thread Raw
In response to Re: Question about todo item  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-hackers
Jan Wieck <JanWieck@yahoo.com> writes:
>     For  all  the  default operations, the system would treat the
>     datums still like regular attributes. That means, that an

>         INSERT ... SELECT ...

>     copying a BLOB from one table to another (and that's correct,
>     BLOB's  should  have  copy  semantics) would force the entire
>     BLOB data into memory ... and ...  then ...  after  ...  some
>     ... time ... run out of memory.

This does not seem expensive or difficult to solve.  tuptoaster.c
will be handed a TOAST pointer as part of heap_insert, and it will
know that it has to duplicate the value.  It seems an easy, localized
change to persuade it to do that copying chunk-at-a-time instead of
suck-it-all-in-then-spew-it-all-out.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Question about todo item
Next
From: Bruce Momjian
Date:
Subject: Re: Re: Null-safe GiST interface (proposal)