Обсуждение: Connecting 2 databases within the same instance

Поиск
Список
Период
Сортировка

Connecting 2 databases within the same instance

От
M Sarwar
Дата:

 

 

Hello,

 

 I have one instance and two database within it. What is the simplest approach which I can adopt to connect these 2 database to one another.

I want to have the ability to connect to any table. For example database link in Oracle databases. How can I deploy this gracefully?

 

Thanks,

Sarwar

Re: Connecting 2 databases within the same instance

От
Scott Ribe
Дата:
> On Oct 13, 2023, at 3:53 PM, M Sarwar <sarwarmd02@outlook.com> wrote:
>
>
>   Hello,
>   I have one instance and two database within it. What is the simplest approach which I can adopt to connect these 2
databaseto one another. 
> I want to have the ability to connect to any table. For example database link in Oracle databases. How can I deploy
thisgracefully? 
>  Thanks,
> Sarwar

maybe: https://www.postgresql.org/docs/current/postgres-fdw.html




Re: Connecting 2 databases within the same instance

От
M Sarwar
Дата:
Looking into it.
Thanks Scott!
Sarwar


From: Scott Ribe <scott_ribe@elevated-dev.com>
Sent: Friday, October 13, 2023 5:58 PM
To: M Sarwar <sarwarmd02@outlook.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Connecting 2 databases within the same instance
 
> On Oct 13, 2023, at 3:53 PM, M Sarwar <sarwarmd02@outlook.com> wrote:
>
>
>   Hello,
>   I have one instance and two database within it. What is the simplest approach which I can adopt to connect these 2 database to one another.
> I want to have the ability to connect to any table. For example database link in Oracle databases. How can I deploy this gracefully?
>  Thanks,
> Sarwar

maybe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.postgresql.org%2Fdocs%2Fcurrent%2Fpostgres-fdw.html&data=05%7C01%7C%7Ce6781d6ff5b74309aa1508dbcc378edb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638328311218055582%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=bBtfp0eFhqDAgvZy3hlybdVn80kFVXETZi%2Bkvmgx4rs%3D&reserved=0

Re: Connecting 2 databases within the same instance

От
swastik Gurung
Дата:
I think any of the two contrib module dblink and/or postgres_fdw could help
On Saturday, 14 October 2023 at 03:38:33 GMT+5:45, M Sarwar <sarwarmd02@outlook.com> wrote:


#yiv3643911366 P {margin-top:0;margin-bottom:0;}

 

 

Hello,

 

 I have one instance and two database within it. What is the simplest approach which I can adopt to connect these 2 database to one another.

I want to have the ability to connect to any table. For example database link in Oracle databases. How can I deploy this gracefully?

 

Thanks,

Sarwar

RE: Connecting 2 databases within the same instance

От
M Sarwar
Дата:
Hi,
Are you saying that Db Link is existing in the Postgress or just referring to FDW ?
Sarwar




Sent from my Galaxy



-------- Original message --------
From: swastik Gurung <gurung_swastik@yahoo.com>
Date: 10/13/23 9:37 PM (GMT-05:00)
To: pgsql-admin@postgresql.org, M Sarwar <sarwarmd02@outlook.com>
Subject: Re: Connecting 2 databases within the same instance

I think any of the two contrib module dblink and/or postgres_fdw could help
On Saturday, 14 October 2023 at 03:38:33 GMT+5:45, M Sarwar <sarwarmd02@outlook.com> wrote:



 

 

Hello,

 

 I have one instance and two database within it. What is the simplest approach which I can adopt to connect these 2 database to one another.

I want to have the ability to connect to any table. For example database link in Oracle databases. How can I deploy this gracefully?

 

Thanks,

Sarwar

Re: Connecting 2 databases within the same instance

От
Scott Ribe
Дата:
dblink is an older way to access external databases, in general I'd prefer FDW

--
Scott Ribe
scott_ribe@elevated-dev.com
https://www.linkedin.com/in/scottribe/



> On Oct 13, 2023, at 7:40 PM, M Sarwar <sarwarmd02@outlook.com> wrote:
>
> Are you saying that Db Link is existing in the Postgress or just referring to FDW ?
>




Re: Connecting 2 databases within the same instance

От
Ron
Дата:
Google is your friend.  Searching for "postgresql dblink" and "postgresql fdw" take you right to the documentation:
https://www.postgresql.org/docs/15/dblink.html
https://www.postgresql.org/docs/current/postgres-fdw.html

DB Link is much older, while FDW has better syntax and is usually faster:
"
The functionality provided by this module overlaps substantially with the functionality of the older dblink module. But postgres_fdw provides more transparent and standards-compliant syntax for accessing remote tables, and can give better performance in many cases.
"

On 10/13/23 20:40, M Sarwar wrote:
Hi,
Are you saying that Db Link is existing in the Postgress or just referring to FDW ?
Sarwar




Sent from my Galaxy



-------- Original message --------
From: swastik Gurung <gurung_swastik@yahoo.com>
Date: 10/13/23 9:37 PM (GMT-05:00)
Subject: Re: Connecting 2 databases within the same instance

I think any of the two contrib module dblink and/or postgres_fdw could help
On Saturday, 14 October 2023 at 03:38:33 GMT+5:45, M Sarwar <sarwarmd02@outlook.com> wrote:


#yiv3643911366 p {margin-top:0; margin-bottom:0}

 

 

Hello,

 

 I have one instance and two database within it. What is the simplest approach which I can adopt to connect these 2 database to one another.

I want to have the ability to connect to any table. For example database link in Oracle databases. How can I deploy this gracefully?

 

Thanks,

Sarwar


--
Born in Arizona, moved to Babylonia.

Re: Connecting 2 databases within the same instance

От
M Sarwar
Дата:
Hello Ron,
Thank you so much! I will go over them.
Sarwar


From: Ron <ronljohnsonjr@gmail.com>
Sent: Friday, October 13, 2023 10:15 PM
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Connecting 2 databases within the same instance
 
Google is your friend.  Searching for "postgresql dblink" and "postgresql fdw" take you right to the documentation:
https://www.postgresql.org/docs/15/dblink.html
https://www.postgresql.org/docs/current/postgres-fdw.html

DB Link is much older, while FDW has better syntax and is usually faster:
"
The functionality provided by this module overlaps substantially with the functionality of the older dblink module. But postgres_fdw provides more transparent and standards-compliant syntax for accessing remote tables, and can give better performance in many cases.
"

On 10/13/23 20:40, M Sarwar wrote:
Hi,
Are you saying that Db Link is existing in the Postgress or just referring to FDW ?
Sarwar




Sent from my Galaxy



-------- Original message --------
From: swastik Gurung <gurung_swastik@yahoo.com>
Date: 10/13/23 9:37 PM (GMT-05:00)
Subject: Re: Connecting 2 databases within the same instance

I think any of the two contrib module dblink and/or postgres_fdw could help
On Saturday, 14 October 2023 at 03:38:33 GMT+5:45, M Sarwar <sarwarmd02@outlook.com> wrote:



 

 

Hello,

 

 I have one instance and two database within it. What is the simplest approach which I can adopt to connect these 2 database to one another.

I want to have the ability to connect to any table. For example database link in Oracle databases. How can I deploy this gracefully?

 

Thanks,

Sarwar


--
Born in Arizona, moved to Babylonia.

Re: Connecting 2 databases within the same instance

От
M Sarwar
Дата:
Hello Scott,
You have a solid point. I am coming onto Postgress environments for the last one year.
Thank you so much,
Sarwar


From: Scott Ribe <scott_ribe@elevated-dev.com>
Sent: Friday, October 13, 2023 10:08 PM
To: M Sarwar <sarwarmd02@outlook.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Connecting 2 databases within the same instance
 
dblink is an older way to access external databases, in general I'd prefer FDW

--
Scott Ribe
scott_ribe@elevated-dev.com
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fin%2Fscottribe%2F&data=05%7C01%7C%7C48c15f64f1b34b39d37508dbcc5a7ba6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638328461215945939%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=4lfbwFS8j6LznWFYX1G9PtR%2BHdXeb6KvqDph1JWxdaw%3D&reserved=0



> On Oct 13, 2023, at 7:40 PM, M Sarwar <sarwarmd02@outlook.com> wrote:
>
> Are you saying that Db Link is existing in the Postgress or just referring to FDW ?
>