Re: Which backend using which pg_temp_N schema?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Which backend using which pg_temp_N schema?
Дата
Msg-id 11089.1528301517@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Which backend using which pg_temp_N schema?  (Jerry Sievers <gsievers19@comcast.net>)
Ответы Re: Which backend using which pg_temp_N schema?
Список pgsql-general
Jerry Sievers <gsievers19@comcast.net> writes:
> Yep thanks... but IMO something that simply exposes whatever internal
> registry of temp schemas/PIDs (which I presume must exist)

Not really.  There are a couple of ways that one could identify a
session's "BackendId", which is the "N" in the "pg_temp_N" name of
the temp schema that it would use if it uses one.  But I do not think
there's any terribly reliable way to tell from outside the session
whether it has actually done anything with the temp schema.  If it
hasn't, then at least in principle there could be objects in the
schema that are left over from a crashed session that previously had
the same BackendId.  We only make an effort to clean out such objects
at the time that a session first creates a temp object.

In any case, I think you're right that this isn't exposed at the SQL
level presently.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Jerry Sievers
Дата:
Сообщение: Re: Which backend using which pg_temp_N schema?
Следующее
От: Jeremy Finzel
Дата:
Сообщение: Slow planning time for simple query