Re: what causes new temp schemas to be created

2023-07-10 Thread Tom Lane
Ted Toth writes: > So it's an optimization to reuse existing but currently unused temp > schemas, correct? Exactly. We could just destroy and recreate the old temp schema, but that seems to lead to useless catalog churn. Instead we just destroy any old contents, if there's an existing temp sche

Re: what causes new temp schemas to be created

2023-07-10 Thread Ted Toth
So it's an optimization to reuse existing but currently unused temp schemas, correct? On Mon, Jul 10, 2023 at 11:22 AM David G. Johnston wrote: > > On Mon, Jul 10, 2023 at 9:20 AM Ted Toth wrote: >> >> I don't see that the schema is removed when the session is over and I >> see other sessions co

Re: what causes new temp schemas to be created

2023-07-10 Thread David G. Johnston
On Mon, Jul 10, 2023 at 9:20 AM Ted Toth wrote: > I don't see that the schema is removed when the session is over and I > see other sessions come along later and use it. I'm assuming here that > a session is started on connect and ended when the connection is > closed. > > The first time a sessio

Re: what causes new temp schemas to be created

2023-07-10 Thread Ted Toth
I don't see that the schema is removed when the session is over and I see other sessions come along later and use it. I'm assuming here that a session is started on connect and ended when the connection is closed. On Mon, Jul 10, 2023 at 9:21 AM David G. Johnston wrote: > > On Mon, Jul 10, 2023 a

Re: what causes new temp schemas to be created

2023-07-10 Thread Ron
On 7/10/23 09:20, David G. Johnston wrote: On Mon, Jul 10, 2023 at 7:18 AM Ted Toth wrote: When a temp table is created I see a pg_temp_NNN (for example pg_temp_3, pg_toast_temp_3) schemas created when/why are additional temp schemas created( pg_temp_4/pg_toast_temp_4)? Temporary

Re: what causes new temp schemas to be created

2023-07-10 Thread David G. Johnston
On Mon, Jul 10, 2023 at 7:18 AM Ted Toth wrote: > When a temp table is created I see a pg_temp_NNN (for example > pg_temp_3, pg_toast_temp_3) schemas created when/why are additional > temp schemas created( pg_temp_4/pg_toast_temp_4)? > > Temporary schemas are isolated to the session they are crea

what causes new temp schemas to be created

2023-07-10 Thread Ted Toth
When a temp table is created I see a pg_temp_NNN (for example pg_temp_3, pg_toast_temp_3) schemas created when/why are additional temp schemas created( pg_temp_4/pg_toast_temp_4)? Ted