Thread: Dump comments on large objects in text mode

Dump comments on large objects in text mode

From
Christopher Kings-Lynne
Date:
Hi,

Attached patch enables dumping of LOB comments when in text mode.

I really don't get the binary/custom format LOB stuff (and don't have
time to investigate), so perhaps someone else can do that.

Having it in text format is still an improvement though.

Chris

Attachment

Re: Dump comments on large objects in text mode

From
Tom Lane
Date:
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> Attached patch enables dumping of LOB comments when in text mode.
> I really don't get the binary/custom format LOB stuff (and don't have
> time to investigate), so perhaps someone else can do that.

That's pretty icky :-(.  I think the right way is more like this.

            regards, tom lane


Attachment

Re: Dump comments on large objects in text mode

From
Alvaro Herrera
Date:
On Wed, Jun 29, 2005 at 11:05:43PM -0400, Tom Lane wrote:
> Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> > Attached patch enables dumping of LOB comments when in text mode.
> > I really don't get the binary/custom format LOB stuff (and don't have
> > time to investigate), so perhaps someone else can do that.
>
> That's pretty icky :-(.  I think the right way is more like this.

Wow, that's complex.  No wonder I wasn't able to come up with a patch to
dump ALTER DATABASE commands some time ago.


--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"Endurecerse, pero jamás perder la ternura" (E. Guevara)

Re: Dump comments on large objects in text mode

From
Christopher Kings-Lynne
Date:
>>Attached patch enables dumping of LOB comments when in text mode.
>>I really don't get the binary/custom format LOB stuff (and don't have
>>time to investigate), so perhaps someone else can do that.
>
>
> That's pretty icky :-(.  I think the right way is more like this.

Hehe - in the world of open source, convincing someone to implement
something is almost as good as doing it yourself :)

Thanks for that, pg_dump is really going great guns now...

Chris


Re: Dump comments on large objects in text mode

From
Tom Lane
Date:
Alvaro Herrera <alvherre@surnet.cl> writes:
> On Wed, Jun 29, 2005 at 11:05:43PM -0400, Tom Lane wrote:
>> That's pretty icky :-(.  I think the right way is more like this.

> Wow, that's complex.  No wonder I wasn't able to come up with a patch to
> dump ALTER DATABASE commands some time ago.

The trick in hacking pg_dump is to understand which layer you need to
modify.  The whole thing seems overly complex to me :-( ... but
redesigning it is a project for another release cycle.

            regards, tom lane

(BTW: Alvaro, I've been having direct mail to you bounce lately ---
let's see if this goes through ...)

Re: Dump comments on large objects in text mode

From
Christopher Kings-Lynne
Date:
> The trick in hacking pg_dump is to understand which layer you need to
> modify.  The whole thing seems overly complex to me :-( ... but
> redesigning it is a project for another release cycle.

I just find the whole BLOB handling very tricky to understand :(

I vote that we combine pg_dumpall and pg_dump into a single app in the
future...

It should be possible to make them both work backward compatibly.  Means
we can possibly gain custom format full cluster dumps.

Chris


Re: Dump comments on large objects in text mode

From
Tom Lane
Date:
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> we can possibly gain custom format full cluster dumps.

Do we care?  The main rationale for inventing a custom format, as I
recall it, was (a) plain text couldn't hack blobs and (b) you needed
the ability to rearrange the dump order to work around pg_dump's lack
of understanding of dependencies.  (a) is a dead letter now and (b)
is much less compelling than it once was.

The custom format is still interesting in that it provides the option
to do selective reload --- but if that's what you want, dumping a
database at a time doesn't seem like a terrible restriction.

            regards, tom lane

Re: Dump comments on large objects in text mode

From
Alvaro Herrera
Date:
On Wed, Jun 29, 2005 at 11:44:58PM -0400, Tom Lane wrote:

> (BTW: Alvaro, I've been having direct mail to you bounce lately ---
> let's see if this goes through ...)

Yeah, sorry about that :-(  I realized I must change mail provider ASAP
when I noticed it's been eating my own emails (e.g. the autovacuum
patch.)  Still not clear what should I switch to :-(

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"Always assume the user will do much worse than the stupidest thing
you can imagine."                                (Julien PUYDT)