Re: lo_create(oid, bytea) breaks every extant release of libpq

From: Noah Misch <noah(at)leadboat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: lo_create(oid, bytea) breaks every extant release of libpq
Date: 2014-06-12 21:09:41
Message-ID: 20140612210941.GB705509@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 12, 2014 at 02:53:23PM -0400, Tom Lane wrote:
> Noah Misch <noah(at)leadboat(dot)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.

I see. TAP suite coverage for a data-included dump/restore would be worth its
weight, agreed.

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

That could have easily remained undiscovered until release day. Not good.

--
Noah Misch
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-06-12 21:18:40 Re: B-Tree support function number 3 (strxfrm() optimization)
Previous Message Peter Geoghegan 2014-06-12 21:09:33 Re: B-Tree support function number 3 (strxfrm() optimization)