From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Stuart Bishop <stuart(at)stuartbishop(dot)net>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5857: pg_restore --clean dropping type too soon |
Date: | 2011-03-11 12:05:54 |
Message-ID: | 201103111205.p2BC5sM14014@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Tom Lane wrote:
> "Stuart Bishop" <stuart(at)stuartbishop(dot)net> writes:
> > "pg_restore --clean" appears to have an ordering problem, where a custom
> > type is being dropped before some functions that use that custom type as a
> > parameter, which fails.
>
> It's always worked that way, and is difficult to avoid because of the
> circular dependencies between a type and its I/O functions. If we were
> to suppress the DROP FUNCTION commands for the I/O functions, we could
> have a non-cosmetic failure: suppose the functions have been created
> in the target DB, but not the type itself? Then the DROP TYPE CASCADE
> wouldn't remove the functions, and we'd have a conflict when the script
> tries to create them again.
>
> I don't think anyone's ever felt that it was essential for --clean to
> not produce any "no such object" errors, since in general you'd get some
> of those anyway unless the target DB exactly matches the source. Maybe
> an appropriate response is to document that this is expected.
Applied doc patch attached.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachment | Content-Type | Size |
---|---|---|
/rtmp/restore.diff | text/x-diff | 531 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Castro | 2011-03-11 12:06:00 | BUG #5925: Files corrupted |
Previous Message | Bruce Momjian | 2011-03-11 11:02:26 | Re: [BUGS] BUG #5842: Memory leak in PL/Python when taking slices of results |