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 1vw6n7-003DFA-1W for pgsql-general@arkaria.postgresql.org; Fri, 27 Feb 2026 22:58:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vw6n5-007Waf-0e for pgsql-general@arkaria.postgresql.org; Fri, 27 Feb 2026 22:58:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vw6n4-007WaK-2n for pgsql-general@lists.postgresql.org; Fri, 27 Feb 2026 22:58:34 +0000 Received: from mail-oo1-xc34.google.com ([2607:f8b0:4864:20::c34]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vw6n1-00000001dr8-3WVl for pgsql-general@lists.postgresql.org; Fri, 27 Feb 2026 22:58:34 +0000 Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-676e5c56fe1so1213827eaf.1 for ; Fri, 27 Feb 2026 14:58:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772233110; cv=none; d=google.com; s=arc-20240605; b=XV2RNm80xwb1Vis+smzFDxxBow4N8CrjBnKWDZ9RdmwIc7xeYpk7mPBVZWRDLJRzDX oL/xustNz+cRU2MVNx9f0h+gELOXmv5veKHiQ1deo7MP7zEZlv+rvGtwH0tExhNbClNt Ac0P6guBMUk6BmsdlQQiZgeC4VxNhw7Vt6ODDTMF3d8kYVcrX/edoThFXmJS3MD+uFcz 6imBeoQZgQytxZgKA/HBEsLWF5zMne+vjsYuhBZwi93/PR8duLSUtWPhKD6spfUUVCmf z2rR4InyELyrmcvbQ8qUL3Up8d+83vMh3cLvUboFqV+Ne1qVd/E4/ZpdtPpjaGzF7Wpo odhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=cYFSWJ2Pnw5uEWbX7Cdxm5ehBbHBFuWou8JOllqMoZU=; fh=SVwRzqxGachPxJDtSXVMZmHiGOaPm1qGNosR1GLID1s=; b=Lj5dExPwamt3Mt/JIX53QaRXcMDDZ70YeBFNqdQI12bRtJWoCiSPFh+5ymckUAlrqE V1NA556F5EM5PnwsjTir5oMSSLGMVeOa7tf/MLjsEZyC9TOiNTNmKg+/wBdOAPfMEdEg TDnuvYwzXQtLSbXzzqn6tRMXhkXoUDOvV8iS4klx3/xI4Qi9WirDl0JkebwmmgxLnrHT xnp1km0eLrK7/3AMfTJU3VbxRsh6pmna2RQFX1Cr5Ay9QLHHiRvBOZ3HlG3XUATNKOYv CX1WBMBnbA+vTy4LhyWKR7Gfni3D1XY5kpCCZeHt18qG0b8VWSMViDXMTHIlNmuJqk7D zcIQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772233110; x=1772837910; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cYFSWJ2Pnw5uEWbX7Cdxm5ehBbHBFuWou8JOllqMoZU=; b=cvSefErOKGnYhDBVwJkcYFjK0xu65sMjNaEtpjOUuHMhSb9WNR/pRlsDkSBNA4j5uu goROU2Jb4pEiUhegFMdmpwiIFAcSn7qHTo8TP5BFTmA4vupZvKkSrpR+CoDkUsKb7SNA 5uI9zxeiB1xalzRo7gfoYQnfW6uPqbE190RuDxMBB8iT/4duDmLOSIkK1MwxJyg03Nj2 fTmOEKjCGMxN/Y7gB/aAG/GLfx3G8fiVLe+PchekQHsdC4ENopiQFo5dDbSQmnjBgIGa NAtaaRFoHIuvCk9Px+oRs+gq4lHdG8GCgIuoW8PfTYBIRO1DHO1rfg28z/cm3sy9D84z 4aoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772233110; x=1772837910; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cYFSWJ2Pnw5uEWbX7Cdxm5ehBbHBFuWou8JOllqMoZU=; b=QTNl6QOmH3YaV++pZ414G4UJk8UvhKpyrC7eBp84GWs4q2gWU5t2dtFhg187wqbigi CAIxNV9u01elj4JouvgADQkZwpHq4Hny7gIdhyUpCPAn6emRIdwMgf6xNjeND0ZbYxBC kpFLMaye/BPn9hG3XTn4Q8fwZl9Aq/SG/Rngju1jztqeHNu89MCyZEmHoNt/hIvb7RO8 mplmrlWpWOxJxM7l/nXGsye5AhrBX+AXW96XaT+DwmUsAwbi1uWcW1SA9fwUa5R3JEet iCJgq2Pt4qzxyesjN89hnkHEvrxx+o0dOSm3+cb5YchsBXknDRAFjGzgIChilBkVqOBi 8zpg== X-Gm-Message-State: AOJu0Yy9A/2GZwDoyxkFsmsIJqUrLFuEmd0HWMeHMjmQLCGZ9Mnvzc3f 1lbbHGSW05OMrW7GEmJs5OBxb6+ThjDCwtCYc/AaG3cHLv/zoTcjqNiC6c5PMicCGgQgpm/Usl/ azNVcEIO84/B/ICLSHfROfXR5TbPoY/0= X-Gm-Gg: ATEYQzx6FbpJKbEpjRwGwwSUjLYXqXg9bjXHYcLK16dto2EzlW/LZZWFvudW1srHuz7 acMrbO3OOIPZvv7kwytnBsIRwvHRJTe6miMFOaGOWOs/ECqrLLNUihHkaGt4pckfAtOugd53cpc TLnORO7yvhqrcwzQhC/yDmeq7ZrGQLAq1oAKE/EOuj36ZFDDZY1di4AlbwtF42mnDRdnFpbLDUH jwThY2P55ZW9Q0wkWKHPPwi3UVVCi0hJ7xp6Lkq1cIBjRSzTdLqua1tT4hvKAAoEOCOlS0l00TL 7je8uvY= X-Received: by 2002:a05:6820:8109:b0:675:afcf:19f7 with SMTP id 006d021491bc7-679fb471699mr2474386eaf.12.1772233110191; Fri, 27 Feb 2026 14:58:30 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "David G. Johnston" Date: Fri, 27 Feb 2026 15:57:54 -0700 X-Gm-Features: AaiRm51W0vn5y3mZ4zxq5xDWOKLL-bvvk0lHPH0lB3dCM8BRmoMMX_YXqVx3OM8 Message-ID: Subject: Re: Can "on delete cascade" dependency be used in pgdump or similar ? To: dfgpostgres Cc: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000fe020f064bd62c5f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000fe020f064bd62c5f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Feb 27, 2026 at 3:40=E2=80=AFPM dfgpostgres wrote: > But what would be really neat is to leverage that cascade on delete stuf= f > to just pgdump project "a" and use that to create "a_archive". > > Can pgdump do something like that ? > No, it cannot. Is there a better way to approach this problem of archiving one project > (remembering that we do have the "on delete cascade" set up) ? > > Nothing built into core. The only additional feature you could leverage is on delete triggers. But you'd need some custom code for maintenance to ensure all relevant tables have the cascade delete and on delete triggers. David J. --000000000000fe020f064bd62c5f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Feb 27, 2026 at 3:40=E2=80=AFPM dfgpostgres <dfgpostgres3@gmail.com> wrot= e:
=C2=A0Bu= t what would be really neat is to leverage that cascade on delete stuff to = just pgdump=C2=A0project "a" and use that to create "a_archi= ve".=C2=A0=C2=A0

Can pgdump=C2=A0do something= like that ?

No, it cannot.
=

Is there a better way to approach this problem of archiving one p= roject (remembering that we do have the "on delete cascade" set u= p) ?


Nothing built= into core.=C2=A0 The only additional feature you could leverage=C2=A0is on= delete triggers.=C2=A0 But you'd need some custom code for maintenance= to ensure all relevant tables have the cascade delete and on delete trigge= rs.

David J.

--000000000000fe020f064bd62c5f--