Noah Misch <noah@leadboat.com> writes:
> On Thu, Jun 12, 2014 at 01:53:19PM -0400, Tom Lane wrote:
>> It'd be a good thing if the TAP tests for client programs included
>> testing of pg_dump/pg_restore, but that's a bit beyond my competence
>> with that tool ... anyone care to step up?
> The pg_upgrade test suite covers this well.
Um, not really: what pg_upgrade exercises is "pg_dump -s" which entirely
fails to cover the data-transfer code paths. It would not have found
this problem.
BTW, after further testing I realized that it was quite accidental that
I found it either. pg_restore only uses libpq's lo_create() function
when restoring an "old_blob_style" archive, ie one generated by 8.4
or earlier. That's what I happened to try to do last night, but it's
pure luck that I did.
Poking around with making the largeobject regression test leave
some stuff behind, I found out that:
1. That regression test includes the text of a Robert Frost poem that
AFAICT is still under copyright. I think we'd better replace it with
something by someone a bit more safely dead.
2. I tried to add a COMMENT ON LARGE OBJECT to one of the not-removed
blobs. While pg_upgrade didn't fail on transferring the blob, it
*did* fail to transfer the comment on it, which seems like a bug.
Bruce, have you got any idea how to fix that?
regards, tom lane