Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jPR8M-0008RY-4n for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Apr 2020 13:34:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jPR8K-0008ST-Vl for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Apr 2020 13:34:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jPR8K-0008SM-Po for pgsql-bugs@lists.postgresql.org; Fri, 17 Apr 2020 13:34:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jPR8G-00029L-5X for pgsql-bugs@lists.postgresql.org; Fri, 17 Apr 2020 13:34:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 03HDY9eY019191; Fri, 17 Apr 2020 09:34:09 -0400 From: Tom Lane To: hritik122@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16373: Behavior of Temporary table creation In-reply-to: <16373-a2325a5f0e87714c@postgresql.org> References: <16373-a2325a5f0e87714c@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 17 Apr 2020 08:32:12 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <19189.1587130449.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Fri, 17 Apr 2020 09:34:09 -0400 Message-ID: <19190.1587130449@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > Hi! Have a small doubt I’m hoping you can help me with..simply put, where > are the temporary tables created? > AFAIK, they stay in the memory till the size reaches the temp_buffers limit, > and then to the storage, for where it is accessed using the temp buffer, They are accessed through temp buffers, yes, but storage space gets reserved on-disk immediately whenever the relation is extended. This is the same as for non-temp tables. regards, tom lane