From: Julie Nishimura <juliezain@hotmail.com>
To: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: partial data migration
Date: Fri, 8 Mar 2019 02:11:54 +0000
Message-ID: <BYAPR08MB5014325DF2A32036F183E9E3AC4D0@BYAPR08MB5014.namprd08.prod.outlook.com> (raw)
In-Reply-To: <313d443d-bfa4-f70d-c984-961343d6b64a@gmail.com>
References: <BYAPR08MB5014FF9F99CF06D03F969DFEAC4C0@BYAPR08MB5014.namprd08.prod.outlook.com>
<3d0f1ba5-5f70-ad05-73bf-072aa7d0d6df@gmail.com>
<BYAPR08MB50141F6594A1ECA52D2CEA41AC4D0@BYAPR08MB5014.namprd08.prod.outlook.com>
<313d443d-bfa4-f70d-c984-961343d6b64a@gmail.com>
Ron, thanksagain. In case if I need to migrate the entire tables, I should be able to use pg_dump and pg_restore for certain tables, even between different versions, right? In case if I need to migrate from 8 to 9?
Thanks
________________________________
From: Ron <ronljohnsonjr@gmail.com>
Sent: Thursday, March 7, 2019 5:59 PM
To: pgsql-general@lists.postgresql.org
Subject: Re: partial data migration
(8.3? That's even older than what we just migrated from!!!)
No. Make some views (I'd probably make them "month-sized"), COPY each view from the source db to a file, and then COPY each file to it's relevant target table.
You should also think about a program named pg_bulkload.
https://www.postgresql.org/docs/9.6/sql-copy.htmlhttps://www.postgresql.org/docs/8.3/sql-copy.html
On 3/7/19 7:53 PM, Julie Nishimura wrote:
Thank you Ron! What if dev environment is on 9.6, but prod is on version 8.3? Will posgtres_fdw still be the right option?
Sent from my iPhone
On Mar 6, 2019, at 11:57 PM, Ron <ronljohnsonjr@gmail.com<mailto:ronljohnsonjr@gmail.com>> wrote:
On 3/7/19 1:54 AM, Julie Nishimura wrote:
Hello psql friends,
We need to migrate only 6 months worth of data from one instance to another. What would be the easiest way to do it? In Oracle, I would set up dblink. What about postgresql?
postgres_fdw
--
Angular momentum makes the world go 'round.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: juliezain@hotmail.com, ronljohnsonjr@gmail.com
Subject: Re: partial data migration
In-Reply-To: <BYAPR08MB5014325DF2A32036F183E9E3AC4D0@BYAPR08MB5014.namprd08.prod.outlook.com>
References: <BYAPR08MB5014FF9F99CF06D03F969DFEAC4C0@BYAPR08MB5014.namprd08.prod.outlook.com> <3d0f1ba5-5f70-ad05-73bf-072aa7d0d6df@gmail.com> <BYAPR08MB50141F6594A1ECA52D2CEA41AC4D0@BYAPR08MB5014.namprd08.prod.outlook.com> <313d443d-bfa4-f70d-c984-961343d6b64a@gmail.com> <BYAPR08MB5014325DF2A32036F183E9E3AC4D0@BYAPR08MB5014.namprd08.prod.outlook.com>
* 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