Re: PoC: pg_dump --filter-data (like Oracle Where Clause on RMAN for specific tables)

Поиск
Список
Период
Сортировка
От Kirk Wolak
Тема Re: PoC: pg_dump --filter-data (like Oracle Where Clause on RMAN for specific tables)
Дата
Msg-id CACLU5mS+iopX196gK_+6XfPisvhoKiZX+xKhnfXg4b+ZqPEZcg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PoC: pg_dump --filter-data (like Oracle Where Clause on RMAN for specific tables)  (Greg Sabino Mullane <htamfids@gmail.com>)
Ответы Re: PoC: pg_dump --filter-data (like Oracle Where Clause on RMAN for specific tables)
Список pgsql-hackers
On Fri, Aug 15, 2025 at 1:25 PM Greg Sabino Mullane <htamfids@gmail.com> wrote:
I've seen this idea pop up over the years, and it's still a good one. Rather than invent new flags, I think a better approach would be to convince pg_dump to dump a view, such that table foo has a view fooslice to limit / filter the output. Then we can simply do:

pg_dump -t foo=view:fooslice
..
While we could make the view mapping into a separate filtering file as you suggest, that's more complexity and also a little more dangerous in an action-at-a-distance way, so I'd rather have people be very specific in the mapping on the command line.

Hmmm, first, we are talking a full pg_dump, with some data filtering, I don't think we can avoid adding some kind of switch.  While being able to do it on the command line is great for 1 table or 2...  it gets unwieldy pretty quickly.  Also, changing this inside of a production environment to maintain the slices when different "dumps" have different parameters (our monthly dump goes back 35 days), so for us, having different files with different settings makes the most sense.

But this is why I am asking for input/feedback.  The feedback is producing ideas...

Thanks!

В списке pgsql-hackers по дате отправления: