Re: Attaching database

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Attaching database
Date: 2020-10-19 18:21:05
Message-ID: CAFj8pRB5Dq3ozKwAS_6rhTg-666L0qN74iXcQ3BnNOSU0jzU8w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

po 19. 10. 2020 v 20:18 odesílatel Igor Korot <ikorot01(at)gmail(dot)com> napsal:

> Hi, Pavel,
>
> On Mon, Oct 19, 2020 at 12:51 PM Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
> >
> > Hi
> >
> > po 19. 10. 2020 v 19:40 odesílatel Igor Korot <ikorot01(at)gmail(dot)com>
> napsal:
> >>
> >> Hi,
> >> IIUC, PostgreSQL does not support attaching a database to an existing
> >> connection.
> >> However I was told that I can use this:
> >> https://www.postgresql.org/docs/9.3/postgres-fdw.html.
> >>
> >> Is it the same thing? Why there is no simple
> >>
> >> ATTACH <db> AS <dbname>
> >>
> >
> > It is a different thing - postgresql_fdw does nested connect - it uses
> client-server protocol.
> >
> > For postgres connect and sql engine process is one entity - and engine
> is written without a possibility to reconnect to another database.
>
> So if I understand correctly the postgresql_fdw is creating a second
> connection and uses it as kind of "virtualizing mechanism"
> in order to give access to the second database.
>

yes - it does new connect to somewhere (local or remote server, but
mechanism is absolutely same)

> Am I right?
>
> Thank you.
>
> >
> > Regards
> >
> > Pavel
> >
> >
> >
> >>
> >> ?
> >>
> >> Thank you.
> >>
> >>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message NECSG Purchasing 2020-10-20 10:59:18 RE:RITM18130676_Query_PostgreSQL support subscription
Previous Message Igor Korot 2020-10-19 18:18:20 Re: Attaching database