Re: Which backend using which pg_temp_N schema? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Which backend using which pg_temp_N schema?
Date
Msg-id 120a2059-3232-c580-5f68-7ce7545f5edb@aklaver.com
Whole thread Raw
In response to Re: Which backend using which pg_temp_N schema?  (Jerry Sievers <gsievers19@comcast.net>)
List pgsql-general
On 06/06/2018 02:00 PM, Jerry Sievers wrote:
> Adrian Klaver <adrian.klaver@aklaver.com> writes:
> 
>> On 06/06/2018 08:54 AM, Jerry Sievers wrote:
>>
>>> Adrian Klaver <adrian.klaver@aklaver.com> writes:
>>>
>>>
>>> Yep thanks... but IMO something that simply exposes whatever internal
>>> registry of temp schemas/PIDs (which I presume must exist) to DBA SQL
>>> avoids any perhaps unreliable hackery such as having to scrape query
>>> text from pg_stat_activity or similar.
>>>
>>> To wit; A long standing session might have any number of temp objects
>>> existing for which records of same in the aforementioned views has long
>>> since been overwritten.
>>
>> True assuming there is no activity against the objects or no open
>> transactions.
>>
>> So what you interested in:
>>
>> 1) What created a temporary object?
> 
> Yes.  Which *session*.

Alright, finally got it through my thick skull:) I was fixated on the 
statement that created the table.

> 
> Thx
> 
>>
>> 2) Temporary objects that are the playing at being permanent objects?
>>
>> 3) Both of the above?
>>
>>
>>>
>>>
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Jerry Sievers
Date:
Subject: Re: Slow planning time for simple query
Next
From: Tom Lane
Date:
Subject: Re: Slow planning time for simple query