Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vr0H5-004ngk-1y for pgsql-bugs@arkaria.postgresql.org; Fri, 13 Feb 2026 21:00:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vr0H3-00GBfS-1y for pgsql-bugs@arkaria.postgresql.org; Fri, 13 Feb 2026 21:00:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vr0H3-00GBfI-0t for pgsql-bugs@lists.postgresql.org; Fri, 13 Feb 2026 21:00:25 +0000 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vr0Gz-00000000VPr-0zaK for pgsql-bugs@lists.postgresql.org; Fri, 13 Feb 2026 21:00:23 +0000 Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-6729292dcd7so549026eaf.0 for ; Fri, 13 Feb 2026 13:00:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771016421; x=1771621221; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=p0RnaS9R5KaiGEY44OjTRjzXwM3bEDTjDj66gY+0fH8=; b=gEgfro2b0sRUykG8Id/mCMlYts84KmYFfAsgn5tNzvLnAPrWawXl4xTV2Z54ddyEYX BNhyVqQGGoGavyOPQhxCjqKl66yB/VmrqZbNIQ/VMVwQ2GHDnl+peiwhaOx62iz/YivX aLf5J8puTS/FEmPkd3BMoCosOZUK/IEsx/fJG6slZoud0obaDwZIHarMso0I4yXBwKa1 VQf9buuZ9twS+iKZRBd4ADZpLcK/Qzz/nF2AFCPJ5uPWg5uz1sFabcm/AyyjtiEfW1GF K8bOSPoAFKeTT2NeAzjirAooEq1wIETWLJ0GI06kiQZTAeTA2XNfgAFZ7kdtyu6LyWy7 s7qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771016421; x=1771621221; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=p0RnaS9R5KaiGEY44OjTRjzXwM3bEDTjDj66gY+0fH8=; b=CFdqdGZLgclXKsqpWjYV0eVCK9uMZ01wI+4ERpMzuNodtY3HwNqIuTT2nfZNkSoqLx Ps3qhzM/abngXiMTQZ9nnjEdSrLV0kVr3yD8fllRpPxlN4rG5EN97U7qHNzcy2AKGHzo ceEhlrtZ5h4uLM4Xb0QaGv1GWc0sBIbAPKlybwX32KOY7Ry3jfWBuq6FrsJop8iAhokv PInorKAETC0Ds+OASjZRd4zi7FU+W15EfhI0PcWa0BQzuIhh7rtpHH4N6paelqBcoD2H WZzylQL37M6fYs46cT8z1kg4+G+3UX9JUz8xrXqC6co8HgyV+yotlhzTdaiupqAys3A+ 0Olw== X-Forwarded-Encrypted: i=1; AJvYcCVBN/ejDZ1zmXUv9ft3w8skUtq/55S8Y64YdrqYLBwiuzwzGjBWXzsw8Qt2oF6oQ7aydWtd92FYQpZg@lists.postgresql.org X-Gm-Message-State: AOJu0YxMvqjtmJHgzs5VzmlkVm8ehqE4w7EnbfyuY1J71ctkZfIVFhVI D4Hx41qHN31MmxKIb4HDSZeZjqVS+jrtHkbn2yEMzXiWBYXpjvBC8df/9/eQRQ== X-Gm-Gg: AZuq6aKPU2P31eJxa/A0bKbF72YFSYpadb4qY9axa+FuyEO1eYtnkqN/HofQi57pPv9 SC7ScWHzDh3unvujFstn3HRMJqh1Bc/fZFWKnioKQfVKNx96yPsM1VvlROt5D4bHmmhmYJJsPlF tnccLqX2AmblG6ACYksGhHQAdofhHxJtsmFaX+ENIj/JxTA4CA/zPKtkeYz0UHNYFgq6oZi9Y9l NUObBEFLJUgUApzWlP/umxtbJg12hnfCJvCzkGMWYKa3F6cEf0cCTHS/Y6R1MGA9rqJdyDUkihZ NiBoi9aw0I0IIzD74MNeNOaTPEHicDmbdnRfViMxgD9ZQaz+Pw6Ej0nqvsxCdznulXYyIj/P4/i g9/TlN+Wf8PSflW7bjgG5OKB/1QePON9TPBB+36xcd+9HB2xfLTN3upY4UScssVfb1yD9JprauF Mx2eGnQVBhR6BURndeDMftmtxaoK5D36Ie65+42uq5hvUT4T++SWK71Kn2ann6/uRiKtryf2UeH ZisZI4rvAJl9GOG X-Received: by 2002:a05:6820:615:b0:664:8baa:fcb2 with SMTP id 006d021491bc7-67769a7eeb8mr1560666eaf.80.1771016421417; Fri, 13 Feb 2026 13:00:21 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-674758eb709sm4471445eaf.12.2026.02.13.13.00.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Feb 2026 13:00:20 -0800 (PST) Date: Fri, 13 Feb 2026 15:00:18 -0600 From: Nathan Bossart To: dominik.hirt@hub28.de, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19407: pg_dump : DROP RULE creates forward references Message-ID: References: <19407-0c327e0fc912b451@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19407-0c327e0fc912b451@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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