pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Kretschmer <andreas@a-kretschmer.de>
To: pgsql-sql@lists.postgresql.org,github kran <githubkran@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
To: pgsql-sql@postgresql.org
Subject: Re: Archival process of partition tables with filtering few rows from tables.
Date: Fri, 29 Mar 2019 06:42:52 +0100
Message-ID: <304BE2C2-7064-4AD7-99CE-C0723D648E1D@a-kretschmer.de> (raw)
In-Reply-To: <CACaZr5SFcUNkRBGwNLRnoCD46RwpAoLTsgm09E9yKO9P2=vTZQ@mail.gmail.com>
References: <CACaZr5SFcUNkRBGwNLRnoCD46RwpAoLTsgm09E9yKO9P2=vTZQ@mail.gmail.com>

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





view thread (2+ messages)

Message-ID: <304BE2C2-7064-4AD7-99CE-C0723D648E1D@a-kretschmer.de>
Permalink:  ../304BE2C2-7064-4AD7-99CE-C0723D648E1D@a-kretschmer.de/
Also on:    postgresql.org/message-id/304BE2C2-7064-4AD7-99CE-C0723D648E1D@a-kretschmer.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: andreas@a-kretschmer.de, githubkran@gmail.com, pgsql-general@postgresql.org
  Subject: Re: Archival process of partition tables with filtering few rows from tables.
  In-Reply-To: <304BE2C2-7064-4AD7-99CE-C0723D648E1D@a-kretschmer.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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