Dump comments on large objects in text mode

Started by Christopher Kings-Lynneabout 21 years ago8 messagespatches
Jump to latest
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

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

Attachments:

blobcomments.txt.gzapplication/x-gzip; name=blobcomments.txt.gzDownload
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#1)
Re: Dump comments on large objects in text mode

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

#3Alvaro Herrera
alvherre@surnet.cl
In reply to: Tom Lane (#2)
Re: Dump comments on large objects in text mode

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)

#4Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Tom Lane (#2)
Re: Dump comments on large objects in text mode

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

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#3)
Re: Dump comments on large objects in text mode

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 ...)

#6Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Tom Lane (#5)
Re: Dump comments on large objects in text mode

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

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#6)
Re: Dump comments on large objects in text mode

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

#8Alvaro Herrera
alvherre@surnet.cl
In reply to: Tom Lane (#5)
Re: Dump comments on large objects in text mode

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)