Re: pg_dump bug in 9.4beta2 and HEAD

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Joachim Wieland <joe(at)mcknight(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Subject: Re: pg_dump bug in 9.4beta2 and HEAD
Date: 2014-08-14 13:13:27
Message-ID: CAFj8pRD9s22qCx8Q7ZFkgFLo5ViXjjX7JqDONNzZmD0h6VhkFg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-08-14 15:11 GMT+02:00 Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>:

> Heikki Linnakangas wrote:
> > On 08/14/2014 06:53 AM, Joachim Wieland wrote:
> > >I'm seeing an assertion failure with "pg_dump -c --if-exists" which is
> > >not ready to handle BLOBs it seems:
> > >
> > >pg_dump: pg_backup_archiver.c:472: RestoreArchive: Assertion `mark !=
> > >((void *)0)' failed.
> > >
> > >To reproduce:
> > >
> > >$ createdb test
> > >$ pg_dump -c --if-exists test (works, dumps empty database)
> > >$ psql test -c "select lo_create(1);"
> > >$ pg_dump -c --if-exists test (fails, with the above mentioned
> assertion)
> >
> > The code tries to inject an "IF EXISTS" into the already-construct
> > DROP command, but it doesn't work for large objects, because the
> > deletion command looks like "SELECT pg_catalog.lo_unlink(xxx)".
> > There is no DROP there.
>
> Ah, so this was broken by 9067310cc5dd590e36c2c3219dbf3961d7c9f8cb.
> Pavel, any thoughts here? Can you provide a fix?
>
> We already have a couple of object-type-specific checks in there, so I
> think it's okay to add one more exception for large objects.
>

i will prepare this fix today

regards

Pavel

>
> --
> Álvaro Herrera http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2014-08-14 13:30:21 Re: Compute attr_needed for child relations (was Re: inherit support for foreign tables)
Previous Message Alvaro Herrera 2014-08-14 13:11:46 Re: pg_dump bug in 9.4beta2 and HEAD