Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YfBTC-0001iK-HE for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Apr 2015 18:09:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YfBTB-0001Wl-6t for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Apr 2015 18:09:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yf8RQ-0002Dp-Jb for pgsql-bugs@postgresql.org; Mon, 06 Apr 2015 14:55:56 +0000 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Yf8RH-0004L4-BZ for pgsql-bugs@postgresql.org; Mon, 06 Apr 2015 14:55:55 +0000 Received: by wgyo15 with SMTP id o15so18077476wgy.2 for ; Mon, 06 Apr 2015 07:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:organization:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=RbpIJISKdn0BNgDMHsYQ755NQs7ZI82tytqTC44xpCY=; b=oY1fMYyexhq0EkKI9nBqwXl4FGNH+zDl5dz+yVNCkhMbj0FJREGpccNiHJxm9mdVYU BNGk8LTjt7qTcCnDYNG9f7LhJBay6ucp7CVmjZaJVFx/s9WB4zcR6BxuP2Kfxx6jEqLl Ls6vD/nXJsgmetH+ORxcmct1e9iL382QSZmQFrhCw+ZRa+zWZijTThan5Pc35l8rZGr2 tDSGxA0XO7WwySWe5YNPg9XSNyGAmApfQ06JoMHLnQPhQ9twmuozEWH3xJzF1WeGaEfw iI/ftR+H30178ujegLwEfwSUdjEIQU02KuKVZUm2vDqbvmygUPiHpX+woaNJfIjqzEkR Vp/g== X-Received: by 10.194.5.103 with SMTP id r7mr30648034wjr.47.1428332146402; Mon, 06 Apr 2015 07:55:46 -0700 (PDT) Received: from [192.168.1.7] ([92.247.26.34]) by mx.google.com with ESMTPSA id e18sm6752478wjz.27.2015.04.06.07.55.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Apr 2015 07:55:44 -0700 (PDT) Message-ID: <55229E70.3040305@gmail.com> Date: Mon, 06 Apr 2015 17:55:44 +0300 From: Peter Slavov Organization: sumup User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Icedove/36.0 MIME-Version: 1.0 To: Andres Freund CC: pgsql-bugs@postgresql.org Subject: Re: BUG #12910: Memory leak with logical decoding References: <20150327094757.2488.58808@wrigleys.postgresql.org> <20150331144048.GL4878@alap3.anarazel.de> <55227D87.9080007@gmail.com> <20150406135026.GJ17586@awork2.anarazel.de> In-Reply-To: <20150406135026.GJ17586@awork2.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.7 (--) 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 Andres, Thanks for the answer, and happy holidays На 6.04.2015 в 16:50, Andres Freund написа: > 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. I tried with more transactions or without limit there but there is no difference. I actually tried before with pg_recvlogical, which is actually using the streaming interface, but the result was exactly the same. My guess is that the problem is in the plug-in actualy.. >> 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? Yes I will try to make a test case that is reproducible. > > Greetings, > > Andres Freund Thanks, Peter Slavov -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs