Re: possibility of partial data dumps with pg_dump

From: Никита Старовойтов <nikstarall(at)gmail(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: possibility of partial data dumps with pg_dump
Date: 2022-10-12 14:46:08
Message-ID: CAC5EiNN5EgHNNFT1iMa8rCb3XfgfOTC1UUNknJ88=Bw=zX7BaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Good afternoon, Indeed, the functionality that I started to implement in
the patch is very similar to what is included in the program you proposed.
Many of the use cases are the same. Thanks for giving me a hint about it. I
have been working on implementing referential integrity, but have not been
able to find simple solutions for a complex structure. And I am not sure if
it can be done in the dump process. Although it is obvious that without
this functionality, the usefulness of the function is insignificant. When I
worked with another database management system, the partial offer feature
was available from the dump program. It was useful for me. But I understand
why it might not be worth extending pg_dump with a non-essential feature.
However, I will try to work again to solve the problem with the guaranteed
recovery of the database. Thanks for the comments, they were really helpful
to me.

вт, 4 окт. 2022 г. в 19:24, Julien Rouhaud <rjuju123(at)gmail(dot)com>:

> Hi,
>
> On Tue, Oct 04, 2022 at 02:15:16PM +0200, Pavel Stehule wrote:
> >
> > út 4. 10. 2022 v 12:48 odesílatel Никита Старовойтов <
> nikstarall(at)gmail(dot)com>
> > napsal:
> >
> > > Hello,
> > > with a view to meeting with postgres code and to get some practice with
> > > it, I am making a small patch that adds the possibility of partial
> tables
> > > dump.
> > > A rule of filtering is specified with standard SQL where clause
> (without
> > > "where" keyword)
> >
> > What is benefit and use case? For this case I don't see any benefit
> against
> > simple
> >
> > \copy (select * from xx where ...) to file CSV
> >
> > or how hard is it to write trivial application that does export of what
> you
> > want in the format that you want?
>
> Also, such approach probably requires a lot of effort to get a valid backup
> (with regards to foreign keys and such).
>
> There's already a project dedicated to generate such partial (and
> consistent)
> backups: https://github.com/mla/pg_sample. Maybe that would address your
> needs?
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-10-12 15:01:48 Re: create subscription - improved warning message
Previous Message Alvaro Herrera 2022-10-12 14:24:40 Re: make_ctags: use -I option to ignore pg_node_attr macro