copy expensive local view to an RDS instance

Started by Marcus Engenealmost 12 years ago6 messagesgeneral
Jump to latest
#1Marcus Engene
mengpg2@engene.se

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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2bricklen
bricklen@gmail.com
In reply to: Marcus Engene (#1)
Re: copy expensive local view to an RDS instance

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

#3Marcus Engene
mengpg2@engene.se
In reply to: bricklen (#2)
Re: copy expensive local view to an RDS instance

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

#4bricklen
bricklen@gmail.com
In reply to: Marcus Engene (#3)
Re: copy expensive local view to an RDS instance

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]https://wiki.postgresql.org/wiki/PL/Proxy should be able to do that.

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

#5Paul Jungwirth
pj@illuminatedcomputing.com
In reply to: Marcus Engene (#3)
Re: copy expensive local view to an RDS instance

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.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#6Marcus Engene
mengpg2@engene.se
In reply to: bricklen (#4)
Re: copy expensive local view to an RDS instance

On 06/05/14 17:15, bricklen wrote:

On Tue, May 6, 2014 at 8:07 AM, Marcus Engene <mengpg2@engene.se
<mailto: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