Re: Archiving Data to Another DB?

From: Don Seiler <don(at)seiler(dot)us>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Archiving Data to Another DB?
Date: 2018-04-11 18:38:39
Message-ID: CAHJZqBDL4-seHSDuT7oGCFZoyznPFnJ3c-JutLf7zV=VWvMTXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Apr 11, 2018 at 1:33 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:
>
> A test case here confirms it sends individual INSERTS:
>
> test_(postgres)# insert into fdw_test_table select * from fdw_test;
> INSERT 0 3
>
> Where fdw_test_table is the remote table and fdw_test is the local one.
>
> postgres-2018-04-11 11:29:23.812 PDT-0LOG: statement: insert into
> fdw_test_table select * from fdw_test;
> postgres-2018-04-11 11:29:23.812 PDT-0LOG: execute pgsql_fdw_prep_2:
> INSERT INTO public.fdw_test_rcv(id, fld_1, fld_2) VALUES ($1, $2, $3)
> postgres-2018-04-11 11:29:23.812 PDT-0DETAIL: parameters: $1 = '1', $2 =
> 'one', $3 = 't'
> postgres-2018-04-11 11:29:23.813 PDT-10140LOG: execute pgsql_fdw_prep_2:
> INSERT INTO public.fdw_test_rcv(id, fld_1, fld_2) VALUES ($1, $2, $3)
> postgres-2018-04-11 11:29:23.813 PDT-10140DETAIL: parameters: $1 = '2',
> $2 = 'two', $3 = 'f'
> postgres-2018-04-11 11:29:23.813 PDT-10140LOG: execute pgsql_fdw_prep_2:
> INSERT INTO public.fdw_test_rcv(id, fld_1, fld_2) VALUES ($1, $2, $3)
> postgres-2018-04-11 11:29:23.813 PDT-10140DETAIL: parameters: $1 = '3',
> $2 = 'three', $3 = 'f'
>
> So much for that idea(:=

Yeah, I saw the same with a 132 row insert. Now imagine that with a monthly
50 million row insert or delete. :p Thanks for the confirmation!

I'm definitely leaning towards the copy/load/delete method.

Don.

--
Don Seiler
www.seiler.us

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-04-11 18:52:43 Re: Fwd: Carto ODBC_FDW issue "ERROR: Connecting to driver" from PG to DB2
Previous Message Don Seiler 2018-04-11 18:33:53 Re: Archiving Data to Another DB?