pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: Attaching database
Date: Sun, 25 Oct 2020 19:26:53 +0100
Message-ID: <20201025182653.GA11390@hjp.at> (raw)
In-Reply-To: <CAFj8pRB5Dq3ozKwAS_6rhTg-666L0qN74iXcQ3BnNOSU0jzU8w@mail.gmail.com>
References: <CA+FnnTz339n4z2WuQfP-WtjMXbf65DYs8mdhWtee7w8-42Ldcw@mail.gmail.com>
	<CAFj8pRCktpj00jQwbPS118jrXs4xwxk=TtMpRMSTf61xE+SR1g@mail.gmail.com>
	<CA+FnnTx-xCQ1=tiU_U734UyAeNhM_AHyWk9ZX9a3DGWhDfKesA@mail.gmail.com>
	<CAFj8pRB5Dq3ozKwAS_6rhTg-666L0qN74iXcQ3BnNOSU0jzU8w@mail.gmail.com>

On 2020-10-19 20:21:05 +0200, Pavel Stehule wrote:
> po 19. 10. 2020 v 20:18 odesílatel Igor Korot <ikorot01@gmail.com> napsal:
>     On Mon, Oct 19, 2020 at 12:51 PM Pavel Stehule <pavel.stehule@gmail.com>
>     wrote:
>     > 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)

In case this isn't clear:

It is the server (or more specifically, the foreign data wrapper) which
opens that connection. To the client it looks like it's just accessing a
normal table within the same database.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (17+ messages)  latest in thread

Message-ID: <20201025182653.GA11390@hjp.at>
Permalink:  ../20201025182653.GA11390@hjp.at/
Also on:    postgresql.org/message-id/20201025182653.GA11390@hjp.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: hjp-pgsql@hjp.at
  Subject: Re: Attaching database
  In-Reply-To: <20201025182653.GA11390@hjp.at>
  References: <CA+FnnTz339n4z2WuQfP-WtjMXbf65DYs8mdhWtee7w8-42Ldcw@mail.gmail.com> <CAFj8pRCktpj00jQwbPS118jrXs4xwxk=TtMpRMSTf61xE+SR1g@mail.gmail.com> <CA+FnnTx-xCQ1=tiU_U734UyAeNhM_AHyWk9ZX9a3DGWhDfKesA@mail.gmail.com> <CAFj8pRB5Dq3ozKwAS_6rhTg-666L0qN74iXcQ3BnNOSU0jzU8w@mail.gmail.com> <20201025182653.GA11390@hjp.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox