Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YcxHE-0006qV-Nq for pgsql-bugs@arkaria.postgresql.org; Tue, 31 Mar 2015 14:36:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YcxHC-0002cn-HC for pgsql-bugs@arkaria.postgresql.org; Tue, 31 Mar 2015 14:36:22 +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 1YbQs1-00074I-Mk for pgsql-bugs@postgresql.org; Fri, 27 Mar 2015 09:48:05 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YbQry-0006lX-EX for pgsql-bugs@postgresql.org; Fri, 27 Mar 2015 09:48:04 +0000 MIME-Version: 1.0 Subject: BUG #12910: Memory leak with logical decoding To: pgsql-bugs@postgresql.org From: pet.slavov@gmail.com Date: Fri, 27 Mar 2015 09:47:57 +0000 Message-ID: <20150327094757.2488.58808@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.3 (/) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 The following bug has been logged on the website: Bug reference: 12910 Logged by: Peter Slavov Email address: pet.slavov@gmail.com PostgreSQL version: 9.4.1 Operating system: Debian wheezy Description: Hi, I am trying to use logical decoding to replay the data modifying queries on a different server, to synchronize some of the tables. The primary server has some load, but not so much. I am getting the changes with pg_logical_slot_get_changes limiting the changes to 50 at a time. At some point pg_logical_slot_get_changes queries become slow and starts to eat all the ram and swap, which eventually kills the primary database with this error: FATAL: the database system is in recovery mode. The nature of changes on the primary can have a lot of data in one transaction. Which I guess is the reason of the slow pg_logical_slot_get_changes. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs