Re: Archival process of partition tables with filtering few rows from tables.

From: Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>
To: pgsql-sql(at)lists(dot)postgresql(dot)org,github kran <githubkran(at)gmail(dot)com>,pgsql-general <pgsql-general(at)postgresql(dot)org>,pgsql-sql(at)postgresql(dot)org
Subject: Re: Archival process of partition tables with filtering few rows from tables.
Date: 2019-03-29 05:42:52
Message-ID: 304BE2C2-7064-4AD7-99CE-C0723D648E1D@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

On 29 March 2019 05:13:31 CET, github kran <githubkran(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Takuma Hoshiai 2019-03-29 07:27:24 what case does xid wraparound warning messages like example emit?
Previous Message github kran 2019-03-29 04:13:31 Archival process of partition tables with filtering few rows from tables.

Browse pgsql-sql by date

  From Date Subject
Next Message Debajyoti Saha 2019-03-29 08:11:17 returning multiple refcursors from inner function
Previous Message github kran 2019-03-29 04:13:31 Archival process of partition tables with filtering few rows from tables.