From: Jerry Sievers <gsievers19@comcast.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jerry Sievers <gsievers19@comcast.net>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Which backend using which pg_temp_N schema?
Date: Wed, 06 Jun 2018 12:13:01 -0500
Message-ID: <87wovbrg82.fsf@jsievers.enova.com> (raw)
In-Reply-To: <11089.1528301517@sss.pgh.pa.us>
References: <87o9go3nok.fsf@jsievers.enova.com>
<81d847d2-59eb-0094-59cf-b91565213f44@aklaver.com>
<87k1rc3ibz.fsf@jsievers.enova.com>
<52ec7e75-9159-7879-fdeb-8d5d120b6ac9@aklaver.com>
<877enbsyf3.fsf@jsievers.enova.com>
<11089.1528301517@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> writes:
> 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.
Hmmm, interesting.
> In any case, I think you're right that this isn't exposed at the SQL
> level presently.
Roger that and what motivated the post was basically to explore that
issue.
Thx
>
> regards, tom lane
>
>
--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 312.241.7800
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: gsievers19@comcast.net, tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com
Subject: Re: Which backend using which pg_temp_N schema?
In-Reply-To: <87wovbrg82.fsf@jsievers.enova.com>
References: <87o9go3nok.fsf@jsievers.enova.com> <81d847d2-59eb-0094-59cf-b91565213f44@aklaver.com> <87k1rc3ibz.fsf@jsievers.enova.com> <52ec7e75-9159-7879-fdeb-8d5d120b6ac9@aklaver.com> <877enbsyf3.fsf@jsievers.enova.com> <11089.1528301517@sss.pgh.pa.us> <87wovbrg82.fsf@jsievers.enova.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