| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
|---|---|
| To: | dominik(dot)hirt(at)hub28(dot)de, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #19407: pg_dump : DROP RULE creates forward references |
| Date: | 2026-02-13 21:00:18 |
| Message-ID: | aY-Q4met3RVF08LP@nathan |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Fri, Feb 13, 2026 at 09:02:37AM +0000, PG Bug reporting form wrote:
> During dump / restore with pg_dump / psql, I encounter a dependency ordering
> issue that breaks the import when using ON_ERROR_STOP=on.
>
> Problem: pg_dump executes DROP RULE for specific views, forcing them to be
> recreated before their dependencies (custom types, collations) exist in the
> dump file, causing import failures.
I think this is an even simpler reproducer:
create type t as enum ('a', 'b');
create table tt (a t primary key, b text);
create view v as select * from tt group by a;
Commit d8c05aff56 [0] did some work in this area, but this issue may even
predate that. In any case, it seems like pg_dump needs to create the type
before it creates the dummy view to deal with circular dependencies.
[0] https://postgr.es/m/flat/19092.1479325184%40sss.pgh.pa.us
--
nathan
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Florents Tselai | 2026-02-13 21:35:04 | Re: BUG #19409: Function jsonb_strip_nulls() changed from immutable to stable. |
| Previous Message | Sebastian Webber | 2026-02-13 20:31:18 | 17.8 standby crashes during WAL replay from 17.5 primary: "could not access status of transaction" |