Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aVRfM-0005dx-5M for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Feb 2016 22:30:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aVRfL-0000rm-OA for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Feb 2016 22:30:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aVRei-0007r2-F6 for pgsql-bugs@postgresql.org; Mon, 15 Feb 2016 22:30:08 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aVRee-0007XY-HP for pgsql-bugs@postgresql.org; Mon, 15 Feb 2016 22:30:08 +0000 MIME-Version: 1.0 Subject: BUG #13962: transaction logs growing on standby To: pgsql-bugs@postgresql.org From: nick.bales@rackspace.com Date: Mon, 15 Feb 2016 22:29:48 +0000 Message-ID: <20160215222948.2605.39385@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) 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: 13962 Logged by: Nick Bales Email address: nick.bales@rackspace.com PostgreSQL version: 9.3.9 Operating system: CentOS 6.6 Description: On several of my postgres 9.3.x clusters with streaming replication, the number of transaction logs(files in pg_xlog, not the archived logs) on the standby nodes are growing past the theoretical maximum(wal_keep_segments + 2 * checkpoint_segments + 1). Most are appropriately getting recycled at each restartpoint, as can be seed with the log entry like: restartpoint complete: wrote 128 buffers (0.0%); 0 transaction log file(s) added, 0 removed, 1 recycled However, at semi-regular intervals, no xlogs are added, removed, or recycled: restartpoint complete: wrote 135 buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled The number of orphaned files for a period directly matches the number of log occurrences where no files are recycled during a restartpoint. There is also no log that a new transaction log file is added, even though the number of xlogs in the directory is growing. Furthermore, once a file is orphaned, it sticks around for the life of the system, ultimately leading to exhausting all disk space on long running systems. Relevant settings: wal_level = hot_standby wal_keep_segments = 200 checkpoint_segments = 128 checkpoint_timeout = 5min checkpoint_completion_target = 0.7 checkpoint_warning = 30s log_checkpoints = on -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs