Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ewxAR-0001k4-1d for pgsql-admin@arkaria.postgresql.org; Fri, 16 Mar 2018 21:45:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ewxAQ-0005fz-4f for pgsql-admin@arkaria.postgresql.org; Fri, 16 Mar 2018 21:45:38 +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 1ewxAP-0005fq-Ql for pgsql-admin@lists.postgresql.org; Fri, 16 Mar 2018 21:45:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ewxAK-0007cb-OI for pgsql-admin@lists.postgresql.org; Fri, 16 Mar 2018 21:45:36 +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 w2GLjUJP002329; Fri, 16 Mar 2018 17:45:30 -0400 From: Tom Lane To: "Heinemann, Manfred (IMS)" cc: Fabio Pardi , "pgsql-admin@lists.postgresql.org" Subject: Re: Function search_path In-reply-to: References: <5f698c34-d01d-3196-1db4-75ba8f6a37d3@portavita.eu> Comments: In-reply-to "Heinemann, Manfred (IMS)" message dated "Fri, 16 Mar 2018 21:09:52 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2327.1521236730.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 16 Mar 2018 17:45:30 -0400 Message-ID: <2328.1521236730@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Heinemann, Manfred (IMS)" writes: > I have played around with the postgres memory settings and setting searc= h_path on a function causes a lot more memory to be used than if no search= _path was set. That's a pretty broad claim with a pretty small amount of evidence offered. I can certainly believe that attaching a SET clause (whether for search_path or any other GUC variable) would have an efficiency impact; one non-obvious example is that it prevents inlining if the function is a SQL function. But I don't immediately see a reason for major memory consumption from that. I suspect what you're seeing is specific to a particular use-case. If you were to provide a concrete example, we could look into what's happening. regards, tom lane