pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Jill Jade <jill779ks@gmail.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_temp schema created while using DB Link
Date: Fri, 8 May 2020 07:56:54 -0700
Message-ID: <a1f20c8a-cce9-16b8-80b6-0d2df8a58a5a@aklaver.com> (raw)
In-Reply-To: <CABGmvVPfEhzg18MgUSpXSTzROaLN3GctkpTZu=aV1bBrbjMm7Q@mail.gmail.com>
References: <CABGmvVOpKsyUMAUdBpg+rZKqn4noVdjyFPLtSBrayxy1=QFoog@mail.gmail.com>
	<2322d8108dde9dd7e7f002e082839aeea055d084.camel@cybertec.at>
	<CABGmvVPfEhzg18MgUSpXSTzROaLN3GctkpTZu=aV1bBrbjMm7Q@mail.gmail.com>

On 5/8/20 12:32 AM, Jill Jade wrote:
> Hello
> 
> We do not have any temporary tables in the Oracle database. The 
> temporary schema is created only while using the db_link. These temp 
> schemas (pg_temp, pg_toast) are not disappearing even after restarting 
> the database.
> 
> These are empty schemas that do not contain anything (tables, views 
> etc). And these schemas keep on increasing each time the query using the 
> db_link is run.

Postgres will keep empty pg_temp schemas around rather then having to 
recreate them the next time they are needed. Not sure where the cutoff 
is for number?

> 
> Why the db_link is causing these schemas? Is there any issue with db_link?
> 
> Thanks
> 
> Regards,
> Jill
> 
> 
> On Fri, 8 May 2020 at 10:36, Laurenz Albe <laurenz.albe@cybertec.at 
> <mailto:laurenz.albe@cybertec.at>> wrote:
> 
>     On Fri, 2020-05-08 at 10:11 +0400, Jill Jade wrote:
>      > We have an issue with DB_Link from Oracle to PostgreSQL. When we
>     try to access tables from
>      > Oracle database via DB_link, temp schemas(pg_temp,pg_toast) are
>     automatically created
>      > in the database while using the query below.
>      >
>      > create table as select * from table@oralink
>      >
>      > Even if we reload the database, the temp schemas are still there.
>      >
>      > Do you know the reason why the temp schemas are being created
>     with DB_link?
>      > Does anyone has a solution for this problem?
> 
>     These schemas contain temporary tables and are not connected to your
>     connection
>     from Oracle (unless you create temporary tables via that connection).
> 
>     They are an implementation detail and should not bother you.
> 
>     What is your problem with these schemmas?
> 
>     Yours,
>     Laurenz Albe
>     -- 
>     Cybertec | https://www.cybertec-postgresql.com
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (5+ messages)

Message-ID: <a1f20c8a-cce9-16b8-80b6-0d2df8a58a5a@aklaver.com>
Permalink:  ../a1f20c8a-cce9-16b8-80b6-0d2df8a58a5a@aklaver.com/
Also on:    postgresql.org/message-id/a1f20c8a-cce9-16b8-80b6-0d2df8a58a5a@aklaver.com

 · 

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: adrian.klaver@aklaver.com, jill779ks@gmail.com, laurenz.albe@cybertec.at
  Subject: Re: pg_temp schema created while using DB Link
  In-Reply-To: <a1f20c8a-cce9-16b8-80b6-0d2df8a58a5a@aklaver.com>
  References: <CABGmvVOpKsyUMAUdBpg+rZKqn4noVdjyFPLtSBrayxy1=QFoog@mail.gmail.com> <2322d8108dde9dd7e7f002e082839aeea055d084.camel@cybertec.at> <CABGmvVPfEhzg18MgUSpXSTzROaLN3GctkpTZu=aV1bBrbjMm7Q@mail.gmail.com> <a1f20c8a-cce9-16b8-80b6-0d2df8a58a5a@aklaver.com>

* 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