Re: BUG #13444: psql can't recover a pg_dump.

From: Sergi Casbas <sergi(dot)casbas(at)iris(dot)cat>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13444: psql can't recover a pg_dump.
Date: 2015-06-16 08:40:03
Message-ID: CA+Q_62Z9T+MeH2BX_k6=MiT8evx1LQa6XFjWN5yXTT3-C+uQQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Jeff,

This example is made by hand, but reproduces a situation made with pg_dump
9.4.4. on a 9.4.1 server

The dump belongs to a project with more than 800 objects, but is a private
project and i'm not authorized to send it to you, this is why I create i
dummy dump that recreates the situation.

Sergi Casbas
*Scrum Master*

*Email: sergi(dot)casbas(at)iris(dot)cat <sergi(dot)casbas(at)iris(dot)cat>Phone Direct : +34 93
554 25 05 <%2B34-93-554-25-05>*

2015-06-15 19:36 GMT+02:00 Jeff Janes <jeff(dot)janes(at)gmail(dot)com>:

> On Mon, Jun 15, 2015 at 3:55 AM, <sergi(dot)casbas(at)iris(dot)cat> wrote:
>
>> The following bug has been logged on the website:
>>
>> Bug reference: 13444
>> Logged by: Sergi Casbas
>> Email address: sergi(dot)casbas(at)iris(dot)cat
>> PostgreSQL version: 9.4.4
>> Operating system: Debian 8
>> Description:
>>
>> When I try to recover a dump made with pg_dump, psql can't recovery some
>> materialized views because the views use a function that is not created
>> yet
>> in the dump sql.
>>
>> Example:
>> SET check_function_bodies = false;
>> SET client_min_messages = warning;
>> SET default_tablespace = '';
>>
>> SET search_path = public, pg_catalog;
>> CREATE MATERIALIZED VIEW testmview AS
>> SELECT publicz.testfunc() AS testfunc
>> WITH NO DATA;
>>
>> CREATE SCHEMA publicz;
>> SET search_path = publicz, pg_catalog;
>>
>> CREATE FUNCTION testfunc() RETURNS integer
>> LANGUAGE sql
>> AS $$SELECT 1;$$;
>>
>> If we swap the order between public an publicz creation it works.
>>
>
> I can't reproduce this. When I create this schema in 9.4.4 and then run
> 9.4.4's pg_dump on it, it gives them to me
> in the proper order. Was the original dump created from 9.4.4 or some
> earlier version? Does there need to be some other objects present to
> trigger this bad order?
>
> Cheers,
>
> Jeff
>

--

Web: www.iris.cat; Twitter: www.
<http://t.signauxcinq.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XZsdDZcWW4WJ24g63RS0FW4XyMQH56dPj7dpZnKn02?t=http%3A%2F%2Fwww.%2F&si=5061214055432192&pi=3b9b88cc-a5b6-420c-818b-b7d44bc26dc7>
twitter.com/iris_rd
<http://t.signauxcinq.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XZsdDZcWW4WJ24g63RS0FW4XyMQH56dPj7dpZnKn02?t=http%3A%2F%2Ftwitter.com%2Firis_rd&si=5061214055432192&pi=3b9b88cc-a5b6-420c-818b-b7d44bc26dc7>

LinkedIn: www.linkedin.com/company/iris-s.l.

--

--

Parc Mediterrani de la Tecnologia, Avda. Carl Friedrich Gauss 11, 08860
Castelldefels, Barcelona (Spain)

Phone office: +34 93 554 25 00;

NexusUCD, University College Dublin, Blocks 9 & 10 Belfield Office Park Belfield,
Dublin (Ireland)

Phone office: +353 (0)1 716 5791;

Privacy Policy:
http://www.iris.cat/wp-content/uploads/2014/01/PoliticaDePrivacidad.pdf
<http://t.signauxcinq.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XZsdDZcWW4WJ24g63RS0FW4XyMQH56dPj7dpZnKn02?t=http%3A%2F%2Fwww.iris.cat%2Fwp-content%2Fuploads%2F2014%2F01%2FPoliticaDePrivacidad.pdf&si=5061214055432192&pi=3b9b88cc-a5b6-420c-818b-b7d44bc26dc7>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Xavier 12 2015-06-16 08:55:11 pg_xlog on a hot_stanby slave
Previous Message Fabien COELHO 2015-06-16 08:05:16 Re: BUG #13442: ISBN doesn't always roundtrip with text