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 1gAVbo-00054G-LN for pgsql-performance@arkaria.postgresql.org; Thu, 11 Oct 2018 07:42:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gAVbm-00032l-EL for pgsql-performance@arkaria.postgresql.org; Thu, 11 Oct 2018 07:42:10 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAVbm-000327-3N; Thu, 11 Oct 2018 07:42:10 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAVbe-0005Ot-R0; Thu, 11 Oct 2018 07:42:08 +0000 Received: from [192.168.127.1] (port=61739 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1gAVba-000KTz-KV; Thu, 11 Oct 2018 07:41:58 +0000 Received: from [127.0.0.1] (port=62947 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1gAVbZ-0003zZ-EP; Thu, 11 Oct 2018 07:41:57 +0000 From: Andrew Gierth To: Mariel Cherkassky Cc: pgsql-admin@lists.postgresql.org, pgsql-performance@lists.postgresql.org Subject: Re: does work_mem is used on temp tables? In-Reply-To: (Mariel Cherkassky's message of "Thu, 11 Oct 2018 09:56:48 +0300") Message-ID: <87efcx7wz1.fsf@news-spur.riddles.org.uk> References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Thu, 11 Oct 2018 08:41:56 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Mariel" == Mariel Cherkassky writes: Mariel> Hi, Mariel> Does the work mem is used when I do sorts or hash operations on Mariel> temp tables ? Or the temp_buffer that is allocated at the Mariel> beginning of the session is used for it ? work_mem is used for sorts and hashes regardless of what type the underlying table (if any) is. temp_buffers is used to buffer the actual _content_ of temp tables. -- Andrew (irc:RhodiumToad)