Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b4b6o-0003kb-M7 for pgsql-admin@arkaria.postgresql.org; Sun, 22 May 2016 21:40:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b4b6o-0007wf-4x for pgsql-admin@arkaria.postgresql.org; Sun, 22 May 2016 21:40:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b4b6m-0007wG-4u for pgsql-admin@postgresql.org; Sun, 22 May 2016 21:40:24 +0000 Received: from mail-ig0-x234.google.com ([2607:f8b0:4001:c05::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1b4b6i-0002iX-WF for pgsql-admin@postgresql.org; Sun, 22 May 2016 21:40:22 +0000 Received: by mail-ig0-x234.google.com with SMTP id bi2so23719244igb.0 for ; Sun, 22 May 2016 14:40:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6POYmB4s9OB7NNf+Gd0V+riwo+7NtgtQ5EP3j0Ro/CE=; b=FKp+OcE6OHEBTtsQ0fmwfi2tXfKl12g909ca2QtgpkGcxCQJHcESMVjVLT1LBtl86j jMmdjzJhcX61s4dF+MSkgDvuOgkXyGQuVEAEiWk7ulf1gVS2qAd03idANHPT4vSZBJd7 +0OosJW8cBl3nBbdcYauukLj970x9/nqT5LRkw8c9/9cqnwqiGqDDqd1+3nNliYFbSYa T6Btm1ud9d6rcXAYsMwTQyqNWTgoB1dH4lVUWQjTrc9urZy5CPemmBnE/s5puV9TgFXz ngP2+t6u2tAVBqc3/IIMydfz+7B9SaixUNS4kqNkspZAjPReEN45Gge52d6+098DIng2 l6LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6POYmB4s9OB7NNf+Gd0V+riwo+7NtgtQ5EP3j0Ro/CE=; b=OGdV9eiE7dOp3mspA/otZxG+pPjIYPKAkKPf+T31DKD7P8r8kOjbszIMoMu1+uiK/P mXj0A18qvSIONDcMzJeaDvNvKMoJ8dgdzv30rOzQCTk58MIzV+T/idtlNf0kvO8oTvNJ yOPttilYcLthUD97v09WgacgA76ZveWCAO2ZmcgXnnHiaqYRZEiwxTP/AS+P5EBL6ow7 LeZ5soSIa3pMlb/fvaHj7/G/2yIheidnUR8WxssH22n3bvF2wKQ5JWiEUCTC9lO7fGpn NUWk8ef2HBLxGsAuyM1m9tEW8kYqx8A6s1dZVFd/RdwYCCwIOaMN3CCB0VnO+ELtsKIA Ts0w== X-Gm-Message-State: AOPr4FU/KI9e0oSIJEk7Oxo5fWU5091MAWfu5U0gKdHZ7/88CTSDzLoXIean4qXL2egmvg== X-Received: by 10.50.30.161 with SMTP id t1mr10823131igh.31.1463953219992; Sun, 22 May 2016 14:40:19 -0700 (PDT) Received: from [192.168.2.12] (TOROON2634W-LP140-03-2925478418.dsl.bell.ca. [174.95.66.18]) by smtp.gmail.com with ESMTPSA id x128sm9250553iod.37.2016.05.22.14.40.19 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 22 May 2016 14:40:19 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: Does my pg_xlog directory look right? From: dstibrany@gmail.com X-Mailer: iPhone Mail (13F69) In-Reply-To: <54621.1463769300@sss.pgh.pa.us> Date: Sun, 22 May 2016 17:40:18 -0400 Cc: pgsql-admin@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <87F21501-4653-4659-9740-4ECB1AB0709E@gmail.com> References: <54621.1463769300@sss.pgh.pa.us> To: Tom Lane X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Thanks for the response and the pg_xlogdump tip. Dave > On May 20, 2016, at 2:35 PM, Tom Lane wrote: >=20 > Dave Stibrany writes: >> There are 98 WAL segments in the directory currently. >=20 >> From the documentation, I understand that the number of WAL files can go= as >> high as (3 * checkpoint_segments + 1) segment files, which would be 97 in >> my case, but I seem to be consistently at this number or even higher >> (sometimes over 110 files) and I don't think I've ever seen the directory >> smaller than ~97 segment files. >=20 > I don't believe there's any aggressive attempt to remove segment files > after transient peak usage (what happens to them instead is explained > below). If you had many times the expected number of segments, I'd be > worried, but these numbers sound pretty normal to me. >=20 >> Regarding the ordering of segments, my understanding is that segment >> 0000012000003720000008B would be written to after 0000001200000372000000= 8A, >> but the timestamps (14:59 and 15:06, respectively) appear to show >> otherwise. There are several cases like this. Does this mean that >> 00000012000003720000008A has newer WAL records than >> 00000012000003720000008B?? >=20 > No, it probably means that neither one has been written at all yet. > Typically, when a WAL segment is deemed no longer needed, the file isn't > physically removed but is merely renamed into place as a future segment. > The idea is to reduce unnecessary filesystem work as we create and delete > WAL segments. You could check this out if you have pg_xlogdump at hand, > by seeing whether the WAL file's first page header claims to belong to the > segment indicated by the file name, or to some much-older segment. >=20 > regards, tom lane --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin