Thread: copy expensive local view to an RDS instance

copy expensive local view to an RDS instance

From
Marcus Engene
Date:
Hi,

I have a local db behind a firewall etc. Basically, I'd like to do what
I'd locally would...

create table abc
as
select
     *
from
     local_expensive_view;

abc - on RDS
local_expensive_view - on local machine

How would you go about doing this?

Thanks,
Marcus



Re: copy expensive local view to an RDS instance

From
bricklen
Date:
On Tue, May 6, 2014 at 5:52 AM, Marcus Engene <mengpg2@engene.se> wrote:
Hi,

I have a local db behind a firewall etc. Basically, I'd like to do what I'd locally would...

create table abc
as
select
    *
from
    local_expensive_view;

abc - on RDS
local_expensive_view - on local machine

How would you go about doing this?

Thanks,
Marcus

A very quick search shows that rds supports dblink, so perhaps that would work.
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html

Re: copy expensive local view to an RDS instance

From
Marcus Engene
Date:
On 06/05/14 16:58, bricklen wrote:
>
> A very quick search shows that rds supports dblink, so perhaps that
> would work.
> http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html

Then I'd need to open our servers to external visits. It would be lovely
if dblink_exec could push a subselect of data instead instead of pull
from RDS. Does this make sense?

Thanks,
Marcus



Re: copy expensive local view to an RDS instance

From
bricklen
Date:
On Tue, May 6, 2014 at 8:07 AM, Marcus Engene <mengpg2@engene.se> wrote:
On 06/05/14 16:58, bricklen wrote:

A very quick search shows that rds supports dblink, so perhaps that would work.
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html

Then I'd need to open our servers to external visits. It would be lovely if dblink_exec could push a subselect of data instead instead of pull from RDS. Does this make sense?

Is the idea to pull data from the RDS to your local machine? If so, dblink or possibly plproxy[1] should be able to do that.

[1] https://wiki.postgresql.org/wiki/PL/Proxy

Re: copy expensive local view to an RDS instance

From
Marcus Engene
Date:
On 06/05/14 17:15, bricklen wrote:
On Tue, May 6, 2014 at 8:07 AM, Marcus Engene <mengpg2@engene.se> wrote:
On 06/05/14 16:58, bricklen wrote:

A very quick search shows that rds supports dblink, so perhaps that would work.
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html

Then I'd need to open our servers to external visits. It would be lovely if dblink_exec could push a subselect of data instead instead of pull from RDS. Does this make sense?

Is the idea to pull data from the RDS to your local machine? If so, dblink or possibly plproxy[1] should be able to do that.

[1] https://wiki.postgresql.org/wiki/PL/Proxy
Sorry, no, I want to push data from my local machine but I've only seen examples of push with dblink_exec and litteral values rather than a subselect or smth.

Best regards,
Marcus

Re: copy expensive local view to an RDS instance

From
Paul Jungwirth
Date:
>> A very quick search shows that rds supports dblink
> Then I'd need to open our servers to external visits.

This is sort of getting away from Postgres, but if the RDS instance is
in a VPC, you could put a VPN on the VPC so dblink wouldn't have to go
over the open Internet.

Paul


On Tue, May 6, 2014 at 8:07 AM, Marcus Engene <mengpg2@engene.se> wrote:
> On 06/05/14 16:58, bricklen wrote:
>>
>>
>> A very quick search shows that rds supports dblink, so perhaps that would
>> work.
>> http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html
>
>
> Then I'd need to open our servers to external visits. It would be lovely if
> dblink_exec could push a subselect of data instead instead of pull from RDS.
> Does this make sense?
>
>
> Thanks,
> Marcus
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general



--
_________________________________
Pulchritudo splendor veritatis.