Re: pg_dump: Remove "blob" terminology - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pg_dump: Remove "blob" terminology
Date
Msg-id CA+Tgmobj3cOd22G884OUZsdr8JuvMaeSnUE-3R-Xi+0916oq1A@mail.gmail.com
Whole thread Raw
In response to Re: pg_dump: Remove "blob" terminology  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Dec 5, 2022 at 10:56 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Interesting idea.  We'd have to either read the TOC multiple times,
> or shove the LOB TOC entries into a temporary file, either of which
> has downsides.

I wonder if we'd need to read the TOC entries repeatedly, or just incrementally.

I haven't studied the pg_dump format much, but I wonder if we could
arrange things so that the "boring" entries without dependencies, or
maybe the LOB entries specifically, are grouped together in some way
where we know the byte-length of that section and can just skip over
it. Then when we need them we go back and read 'em one by one.

(Of course this doesn't work if reading for standard input or if
multiple phases of processing need them or whatever. Not trying to say
I've solved the problem. But in general I think we need to give more
thought to the possibility that "just read all the data into memory"
is not an adequate solution to $PROBLEM.)

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Order getopt arguments
Next
From: Robert Haas
Date:
Subject: Re: Error-safe user functions