Re: lo_create(oid, bytea) breaks every extant release of libpq - Mailing list pgsql-hackers

From Tom Lane
Subject Re: lo_create(oid, bytea) breaks every extant release of libpq
Date
Msg-id 12081.1402599203@sss.pgh.pa.us
Whole thread Raw
In response to Re: lo_create(oid, bytea) breaks every extant release of libpq  (Noah Misch <noah@leadboat.com>)
Responses Re: lo_create(oid, bytea) breaks every extant release of libpq
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: make check For Extensions
Next
From: "David E. Wheeler"
Date:
Subject: Re: make check For Extensions