Re: possibility of partial data dumps with pg_dump

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Никита Старовойтов <nikstarall(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-04 12:24:24
Message-ID: 20221004122424.2pic2p7p3cr3vnub@jrouhaud
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2022-10-04 12:25:39 Re: Reducing the chunk header sizes on all memory context types
Previous Message Pavel Stehule 2022-10-04 12:15:16 Re: possibility of partial data dumps with pg_dump