Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQfY2-0007VZ-Sr for pgsql-general@arkaria.postgresql.org; Wed, 06 Jun 2018 21:00:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fQfY1-0007gN-Q4 for pgsql-general@arkaria.postgresql.org; Wed, 06 Jun 2018 21:00:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQfY1-0007gC-3i for pgsql-general@lists.postgresql.org; Wed, 06 Jun 2018 21:00:49 +0000 Received: from resqmta-ch2-05v.sys.comcast.net ([2001:558:fe21:29:69:252:207:37]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQfXx-0004bf-4l for pgsql-general@postgresql.org; Wed, 06 Jun 2018 21:00:48 +0000 Received: from resomta-ch2-20v.sys.comcast.net ([69.252.207.116]) by resqmta-ch2-05v.sys.comcast.net with ESMTP id QXaPfoxCvrmiVQfXrf2p8r; Wed, 06 Jun 2018 21:00:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1528318839; bh=7FqhCqT42dhuIKkcc9lIel7JjXywly5X1LCe6p+DK8c=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=Ps1bWYWpJQw6/h+vMBzeTml91AMIdgDdqcu1vyoB01pQ+4B1HLHpvK4Ckvc1wHv23 7qcjaWvkbtccj/PO4dkcmIf38VxgGfes86EOn2LczUrAkEaBpX+XkICmn4vXzllHh2 1HMAsw8ZJj3G+yqytrZK9bOgBRCjMHwG3n9egsY0Z+NBWe+8A7EdgvEJpm4wM6HIm2 Po3r0sK7j8v3f4WOkHd/AmO4GozkZfLwTHMOabNlmoOBTngTcJPcG5msYpWsge+AhY RQM1U+7wHqfuVNYNlVLXwMF2XJZ4zX066OS+L9iQRMF4FOPC2LdWVRR4A6qsn8X70z GAjCCD3COM6Qg== Received: from jsievers.comcast.net ([12.187.116.132]) by resomta-ch2-20v.sys.comcast.net with ESMTPA id QfXhfMTFTTGiGQfXhfQh5g; Wed, 06 Jun 2018 21:00:37 +0000 Received: from jsievers.enova.com (localhost [127.0.0.1]) by jsievers.comcast.net (Postfix) with ESMTP id 0DACF260056; Wed, 6 Jun 2018 16:00:28 -0500 (CDT) From: Jerry Sievers To: Adrian Klaver Cc: Jerry Sievers , pgsql-general@postgresql.org Subject: Re: Which backend using which pg_temp_N schema? 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> <69dacd21-cac6-602d-de27-9b66e4e25eaf@aklaver.com> Date: Wed, 06 Jun 2018 16:00:28 -0500 In-Reply-To: <69dacd21-cac6-602d-de27-9b66e4e25eaf@aklaver.com> (Adrian Klaver's message of "Wed, 6 Jun 2018 13:45:48 -0700") Message-ID: <87muw7iqab.fsf@jsievers.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-CMAE-Envelope: MS4wfOUTGX2mkkCDY0xY3mvA1A920I3cC2bYw0W7XyefKbObVd/WRSGeQCwAO7B33FGwZLYgWTj9RTZchk/ftlujmimGNSoC+hWTaYorWsAR1ydhDt9k7W0a 4VdZmdC27sMEl2VRbauPmWGhQaKinYgs2Ca3BwDal4uV+FfUuibletK10qFl4I7sZY9AtOGWhdfVq/sSlw1f+94WuAkaGEzbrS/iP16Re3zEVHFZ50xdnag2 6/Gz4Y1e/nbfyaHIINSfoGLVigajcjkMo5atSafpkU4= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Adrian Klaver writes: > On 06/06/2018 08:54 AM, Jerry Sievers wrote: > >> Adrian Klaver 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*. Thx > > 2) Temporary objects that are the playing at being permanent objects? > > 3) Both of the above? > > >> >> -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net p: 312.241.7800