Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8mkg-0007GM-DY for pgsql-general@arkaria.postgresql.org; Tue, 26 Mar 2019 14:08:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h8mkf-0003E9-8A for pgsql-general@arkaria.postgresql.org; Tue, 26 Mar 2019 14:08:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8mkd-00039v-Jf for pgsql-general@lists.postgresql.org; Tue, 26 Mar 2019 14:08:28 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8mka-0002FC-JY for pgsql-general@postgresql.org; Tue, 26 Mar 2019 14:08:26 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id AAF0620E2A; Tue, 26 Mar 2019 10:08:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 26 Mar 2019 10:08:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=q LazUlof5gjVH9v7I9XgJc6rlhNWFPjYFzf2+6hmIFs=; b=LvHBpmN9aP8JZe2Fc 2wCFjG51ysT1M4Lu/V3Ql4K1FMEoElO5dNaX/+SBc+3Wq3TJW9kVB05GnjQaPPHe p07pcCOZXy7VstiGvX4c/4FdpsSP51rYOn7nVz9i9S7YvoJ05FeLKsismgEvya/L ok/uFfy8F0RsHHTVZfu/sHFJLa0KToEwl5jgVND4lbOA9C6liYAqoHAzrqJQVEN6 SZrDHINnCuXEGoPRsV8Ry9ncro5uD+GChUifZtlekUxzwZPaugMBCkz6Q6Kc1BpY 0BbmDXs/w5PlBP4gOv212zTFkBcKYIJOtsTGz7qCzfY6rpHWdudC0baPQzWy4vbl zl0Mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=qLazUlof5gjVH9v7I9XgJc6rlhNWFPjYFzf2+6hmI Fs=; b=QwsIfjyA8uy2twS+IJABLk5UVkUDJSni0HSVqJeNCTyn/xq+97Fd36l+9 2aKBfVLeHaaauoZrp6NmPCCUZHR1yawHrDR8w9LHD+YEPN3/heZvHOplOsjj7LUI T4c3KS05Zh793LWIl+Scmxdn56SubC1+P6eQvHu62fPDNoF0kLh0//Jdf7KP+tkJ AVs/FoVXsKPRvrRw7ltCHEtm1048NlP7jdgHAlNUO62ogBJaDow+TmSLLp/OD+K6 z2z/psfgrFkD5UMXie/koLpJEscb2UeEbVLZV8wjlLyZnWvzBAhWkm3e+ojr7Ar0 WSysshnC18GkEsoak8pqJghzvVq5Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkedtgdehlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecukfhppeejuddrvdduvddrudehtddrvddtvdenucfrrghrrghmpehmrghilhhfrhho mheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhushhtvg hrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 9C1A6E49E1; Tue, 26 Mar 2019 10:08:22 -0400 (EDT) Subject: Re: stale WAL files? To: Rob Sargent , Forums postgresql References: <10FF70E2-9F70-4469-A4F4-4081988F0204@gmail.com> From: Adrian Klaver Message-ID: <3dccbbe4-e115-11ab-2d78-74c3cc9e2e43@aklaver.com> Date: Tue, 26 Mar 2019 07:08:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <10FF70E2-9F70-4469-A4F4-4081988F0204@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/25/19 5:10 PM, Rob Sargent wrote: > PG10.7, Centos7 > > On Mar15 we filled our default tablespace/WAL partition.  Cleaned up > some old dumps and restarted.  pg_wal had apparently exploded but > cleaned itself up by the next day. On Mar16 I ran CHECKPOINT in all > databases on that server (except template0).  All seems fine except for > 271 WALs from MAR16 going nowhere fast.  Of course we see transient WALS > come and go every day.  We did a restart of the server last Friday > (Mar22) without issue. > > -rw-------. 1 postgres postgres 16777216 Mar 16 16:32 > 0000000100000CE9000000DD >  ...(269 others) > -rw-------. 1 postgres postgres 16777216 Mar 16 17:01 > 0000000100000CEA000000E9 > > What’s keeping these alive.  Or can they be deleted? Any normal admin > routine likely to clean these up? wal_keep_segments? Do you have replication set up and replication slots in use? > > > One of our crew was apparently trying to create a function: he had a > run-away json query which caused memory grief but I don’t see that > reflected anywhere in the log. The log file for that day goes south as > follows. > > [1]2019-03-15 12:09:15.230 MDT [29189] STATEMENT:  select count(*) > from sui.probancset_group_member where group_id = '4ce6a94d-bb2d-\ > 43c2-a1f9-7b68f1618cd4'; > [2]2019-03-15 17:07:30.818 MDT [35020] ERROR:  could not write to > hash-join temporary file: No space left on device > [3]2019-03-15 17:07:30.818 MDT [35020] STATEMENT:  update segment as > s set events_less = s.events_less + b.events_less, events_equal\ >  = s.events_equal + b.events_equal, events_greater = > s.events_greater + b.events_greater, threshold_events = > s.threshold_events +\ >  b.threshold_events from > bulk."bc_1819_17_fd6dbc1e_57e5_4d49_b896_59d6687c8ee6" as b where > s.markerset_id = '8d723d2f-1281-48c5-9\ > 016-2dab3f4d242b' and s.probandset_id = b.probandset_id and > s.markerset_id = b.markerset_id and s.startbase = b.startbase and s.e\ > ndbase = b.endbase and  s.probandset_id >= > '90000000-0000-0000-0000-000000000000' and s.probandset_id < > 'a0000000-0000-0000-0000-\ > 000000000000' > 2019-03-15 17:07:30.818 MDT [317161] PANIC:  could not write to file > "pg_wal/xlogtemp.317161": No space left on device > [4]2019-03-15 17:08:19.231 MDT [35166] ERROR:  unterminated > dollar-quoted string at or near "$$ > >         begin >               --new probandset_group record >               insert into probandset_group(id,name) select > uuid_generate_v4(),'1808_p3c2n4'; > >               --create necessary new probandset and > probandset_group_member records >               select addprobandset(a.name, people, groupname) from >                      (select powerset((select array_agg(name order > by name) lst from base.person >                              where name in (superset))) as name >                              except (select > regexp_split_to_array(p.name,',') from  probandset p  )) a >                      where array_length(a.name,1)>1; > >               --update superset field for new probandset_group >               update probandset_group set proband_superset_id = > (select id from probandset where name = superset); >         end; > > [1] Last reported normal operation > [2] death knell > [3] First failed operation from our application > [4] continued effort from create function work > > Thanks in advance. > > > > -- Adrian Klaver adrian.klaver@aklaver.com