public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: dfgpostgres <[email protected]>
Cc: [email protected]
Subject: Re: Can "on delete cascade" dependency be used in pgdump or similar ?
Date: Fri, 27 Feb 2026 15:57:54 -0700
Message-ID: <CAKFQuwZ-PvXH_0QCxxWm9FujnyLQxVKo+aGDzOSqdxKeANzTFw@mail.gmail.com> (raw)
In-Reply-To: <CAAcmDX_zrfbQ2ixpGH_92SqeM=OJs5wPuW2_F-P+SefjoQGUOQ@mail.gmail.com>
References: <CAAcmDX_zrfbQ2ixpGH_92SqeM=OJs5wPuW2_F-P+SefjoQGUOQ@mail.gmail.com>

On Fri, Feb 27, 2026 at 3:40 PM dfgpostgres <[email protected]> wrote:

>  But what would be really neat is to leverage that cascade on delete stuff
> 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.


view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Can "on delete cascade" dependency be used in pgdump or similar ?
  In-Reply-To: <CAKFQuwZ-PvXH_0QCxxWm9FujnyLQxVKo+aGDzOSqdxKeANzTFw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox