pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Archival process of partition tables with filtering few rows from tables. 2+ messages / 2 participants [nested] [flat]
* Archival process of partition tables with filtering few rows from tables. @ 2019-03-29 04:13 github kran <githubkran@gmail.com> 0 siblings, 1 reply; 2+ messages in thread From: github kran @ 2019-03-29 04:13 UTC (permalink / raw) To: pgsql-general <pgsql-general@postgresql.org>; pgsql-sql Hello Team, We are using PostgreSQL Version 9.6 and planning to archive our partition tables containing about 300 - 500 million rows . We have around ~ 50 partition tables to be archived to a new cold path PostgreSQL database , version 10.6. We have a requirement to filter few rows before exporting this data from these tables as we dont want to archive those rows . What is a better approach to export and restore these tables ?. - Does COPY Command with a filter query to filter few rows using select works better ?. - pg_dump with filtering these rows ?. - Can i able to export my indexes , check constraints , constraints ?. - Any other options ?. Appreciate your replies. Thanks. ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Archival process of partition tables with filtering few rows from tables. @ 2019-03-29 05:42 Andreas Kretschmer <andreas@a-kretschmer.de> parent: github kran <githubkran@gmail.com> 0 siblings, 0 replies; 2+ messages in thread From: Andreas Kretschmer @ 2019-03-29 05:42 UTC (permalink / raw) To: pgsql-sql@lists.postgresql.org,github kran <githubkran@gmail.com>; pgsql-general <pgsql-general@postgresql.org>; pgsql-sql On 29 March 2019 05:13:31 CET, github kran <githubkran@gmail.com> wrote: >Hello Team, > >We are using PostgreSQL Version 9.6 and planning to archive our >partition >tables containing about 300 - 500 million rows . We have around ~ 50 >partition tables to be archived to a new >cold path PostgreSQL database , version 10.6. Consider Version 11 instead, much better features for partitioning. We have a requirement to >filter few rows before exporting this data from these tables as we dont >want to archive those rows . > > What is a better approach to export and restore these tables ?. > >- Does COPY Command with a filter query to filter few rows using select > works better ?. > - pg_dump with filtering these rows ?. > - Can i able to export my indexes , check constraints , constraints ?. > - Any other options ?. Yeah, consider logical replication using pg_logical from us with row filtering. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-03-29 05:42 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-03-29 04:13 Archival process of partition tables with filtering few rows from tables. github kran <githubkran@gmail.com> 2019-03-29 05:42 ` Andreas Kretschmer <andreas@a-kretschmer.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox