Re: Quesion about querying distributed databases - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Quesion about querying distributed databases
Date
Msg-id c9699a6fd331d33864fc269060d8d961f784d827.camel@cybertec.at
Whole thread Raw
In response to Re: Quesion about querying distributed databases  (me nefcanto <sn.1361@gmail.com>)
Responses Re: Quesion about querying distributed databases
Re: Quesion about querying distributed databases
List pgsql-general
On Wed, 2025-03-05 at 12:57 +0330, me nefcanto wrote:
> Right now this data is in MariaDB, on separate databases (schema) but on one
> server. The solution in this situation is to have a cross-database query.
> (this is the status quo of our application)
>
> Now our team has decided to migrate to Postgres. However, we realized that
> Postgres does not support cross-database queries. And if we want to do so,
> we should use FDW. So, we thought we might as well put databases on separate
> servers for scalability if we have to write more code. That's the reason
> behind this question.

In MySQL, the terms "database" and "schema" are used for the same thing.
Not so in PostgreSQL.  I think you should migrate the data into different
schemas in a single database, pretty much like you had it in MySQL.
Then you don't need a foreign data wrapper, and I bet the query can
perform as well as it did on MySQL.

Yours,
Laurenz Albe




pgsql-general by date:

Previous
From: Mike Yeap
Date:
Subject: Virtual patching software for PostgreSQL
Next
From: me nefcanto
Date:
Subject: Re: Quesion about querying distributed databases