Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4z6C-0008A1-Ju for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Jun 2015 22:12:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z4z6C-0004g9-4e for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Jun 2015 22:12:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z4z6B-0004g2-CP for pgsql-bugs@postgresql.org; Tue, 16 Jun 2015 22:12:51 +0000 Received: from mail-pd0-x233.google.com ([2607:f8b0:400e:c02::233]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Z4z63-0001AF-J9 for pgsql-bugs@postgresql.org; Tue, 16 Jun 2015 22:12:50 +0000 Received: by pdjm12 with SMTP id m12so23251201pdj.3 for ; Tue, 16 Jun 2015 15:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=DrmeJiTs503GS92w23v8IGN3q/87ZxnJs3WeUGVfuls=; b=LS3mdMv2RsX89NbhwjseGe3uv6eZ/bb1quQ0zO0iGtlRlMza3BJFIaYfM7tT1woJ8G 1A3HhZBmz660cgVkNWt3xDZjIp90bazLPdnk4ivB8QpfgNDnvkG6180HZOJffLEzYv7e VjYx60yF7DAv2MjAXWQm7YOHU8LqoiorznCiHrjFxelGTzcoLoozdAa9gn2uFpJ72oHL 3GCHJaoYAXgdwvrG9TPoiahJnDj/NI3+ExM6PiJa0UkLdXrixtC01srzqeIBJtMEk5gs jf+sqHy18FYnjjzFPsZI82lCMSZFXxcVIOUxNpO6Yv0pRHyxsEYtOw+/zIhl+eNijqAj 9+8g== X-Received: by 10.66.154.111 with SMTP id vn15mr4479317pab.108.1434492759543; Tue, 16 Jun 2015 15:12:39 -0700 (PDT) Received: from [192.168.0.3] ([162.247.40.130]) by mx.google.com with ESMTPSA id de2sm2454380pdb.15.2015.06.16.15.12.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2015 15:12:38 -0700 (PDT) Message-ID: <55809F54.5000402@gmail.com> Date: Tue, 16 Jun 2015 15:12:36 -0700 From: Lacey Powers User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: [GENERAL] pg_xlog on a hot_standby slave filling up References: <20150616183556.GA9823@msg.df7cb.de> <67E2F20A-6A2E-484E-BF97-544F1FC66566@pgexperts.com> In-Reply-To: <67E2F20A-6A2E-484E-BF97-544F1FC66566@pgexperts.com> Content-Type: text/plain; charset=windows-1252; 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 On 06/16/2015 01:16 PM, Jeff Frost wrote: >> On Jun 16, 2015, at 11:35 AM, Christoph Berg wrote: >> >> [moving to -bugs] >> >> Re: Xavier 12 2015-06-16 >>> Hi everyone, >>> >>> Questions about pg_xlogs again... >>> I have two Postgresql 9.1 servers in a master/slave stream replication >>> (hot_standby). >>> >>> Psql01 (master) is backuped with Barman and pg_xlogs is correctly >>> purged (archive_command is used). >>> >>> Hower, Psql02 (slave) has a huge pg_xlog (951 files, 15G for 7 days >>> only, it keeps growing up until disk space is full). I have found >>> documentation and tutorials, mailing list, but I don't know what is >>> suitable for a Slave. Leads I've found : >> Hi, >> >> I have the same problem here. Master/slave running on 9.3.current. On >> the master everything is normal, but on the slave server, files in >> pg_xlog and archive_status pile up. Interestingly, the filenames are >> mostly 0x20 apart. (IRC user Kassandry is reporting the same issue on >> 9.4 as well, including the 0x20 spacing.) > I’ve seen this before, but haven’t been able to make a reproducible test case yet. > > Are you by chance using SSL to talk to the primary server? Is the ssl_renegotiation_limit the default of 512MB? 32 WAL files at 16MB each = 512MB. I found that it would always leave the WAL file from before the invalid record length message. Does that seem to be the case for you as well? > > > Hello Jeff, To add to this on PostgreSQL 9.4 ( Kassandry from IRC ), yes, I see SSL errors in my logs. I turned off the archive_command I had running on one of my three replicas, which recycled all of the .ready files and all of the outstanding xlogs. I re-enabled the archive_command and waited. I got this in my logs: < @[] LOG: restartpoint complete: wrote 15437 buffers (2.9%); 0 transaction log file(s) added, 0 removed, 5 recycled; write=269.358 s, sync=0.035 s, total=269.397 s; sync files=202, longest=0.008 s, average=0.000 s < @[] LOG: recovery restart point at 650/4D01CCA0 < @[] DETAIL: last completed transaction was at log time 2015-06-16 21:41:41.990409+00 < @[] LOG: restartpoint starting: time < @[] LOG: restartpoint complete: wrote 115 buffers (0.0%); 0 transaction log file(s) added, 0 removed, 12 recycled; write=11.446 s, sync=0.005 s, total=11.455 s; sync files=29, longest=0.001 s, average=0.000 s < @[] LOG: recovery restart point at 650/5204B6C8 < @[] DETAIL: last completed transaction was at log time 2015-06-16 21:42:24.524081+00 < @[] FATAL: could not send data to WAL stream: SSL error: unexpected record < @[] LOG: unexpected pageaddr 650/18000000 in log segment 00000001000006500000005A, offset 0 And a ready file appeared and stayed for 000000010000065000000059 : -rw------- 1 postgres postgres 0 Jun 16 21:57 000000010000065000000059.ready On my other streaming replica, there are lots of these log messages, and it looks like there is also a ready file for each of the segments previous to the segment mentioned in the unexpected pageaddr message. Hope this helps. Please let me know if I can gather further data to help fix this. =) Regards, Lacey -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs