Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yf7QD-0008C5-KM for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Apr 2015 13:50:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yf7QD-0001YE-2T for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Apr 2015 13:50:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yf7QC-0001Y3-1A for pgsql-bugs@postgresql.org; Mon, 06 Apr 2015 13:50:36 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yf7Q8-0002Sa-A9 for pgsql-bugs@postgresql.org; Mon, 06 Apr 2015 13:50:34 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id 2347A860002; Mon, 6 Apr 2015 15:50:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from anarazel.de (p5DDC5871.dip0.t-ipconnect.de [93.220.88.113]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id DD217860001; Mon, 6 Apr 2015 15:50:26 +0200 (CEST) Received: by anarazel.de (Postfix, from userid 1000) id 57337100A41; Mon, 6 Apr 2015 15:50:26 +0200 (CEST) Date: Mon, 6 Apr 2015 15:50:26 +0200 From: Andres Freund To: Peter Slavov Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12910: Memory leak with logical decoding Message-ID: <20150406135026.GJ17586@awork2.anarazel.de> References: <20150327094757.2488.58808@wrigleys.postgresql.org> <20150331144048.GL4878@alap3.anarazel.de> <55227D87.9080007@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55227D87.9080007@gmail.com> X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hi, I'm on holidays right now, so my answers will be delayed. On 2015-04-06 15:35:19 +0300, Peter Slavov wrote: > Before I start I can see that the pg_xlog directory is 7.2 GB size. > This give me some idea that the size of the changes cannot be much bigger > than that. There's no such easy correlation. That said, there pretty much never should be a case where so much memory is needed. > After I start ti get the transactions changes one by one with select * from > pg_logical_slot_get_changes('', null, 1), As I said before, it's *not* a good idea to consume transactions one-by-one. The startup of the decoding machinery is quite expensive. If you want more control about how much data you get you should use the streaming interface. > Maybe I am not understanding something, but is this normal? It's definitely not normal. It's unfortunately also hard to diagnose based on the information so far. Any chance you can build a reproducible test case? Greetings, Andres Freund -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs