Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mLg6b-00011S-Td for pgsql-general@arkaria.postgresql.org; Thu, 02 Sep 2021 06:21:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mLg6a-0005fJ-Fl for pgsql-general@arkaria.postgresql.org; Thu, 02 Sep 2021 06:21:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mLg6a-0005f3-01 for pgsql-general@lists.postgresql.org; Thu, 02 Sep 2021 06:21:44 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mLg6X-0005gi-Mq for pgsql-general@postgresql.org; Thu, 02 Sep 2021 06:21:43 +0000 Received: by mail-wr1-x42b.google.com with SMTP id m9so1055703wrb.1 for ; Wed, 01 Sep 2021 23:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:thread-index :content-language; bh=XTuENq6jKjUDgKWRJ8gVcuf+yh7+EfexemW+8EuAK1M=; b=XrCqURbuYtPif1BTcvd7p2aEFCgCMBkyKMzYGnvIbDKSg41Rnqz+9ssw3NqZEZxeOE IbOHxb5d/xw3qrCgfad8TgPYaMX4m3L+2GFztaQ69w0Bag3SvbDbHC7ufLYPNBeMNEOB KbFctLgEMdGlm3sl7y1ZgC4mUtANhPSOK1yeidkjYjbzHqAvmPmsYFFZsXDPgwMKIKkm 8rZq7V6S8XKkY6My+s7xvzq2+1E8BILi//fkNXKnDB8n/7FVfmrJzoHAvp8JgknAvdJz 7NfjEltBnSxf9wXRM7/GHyk4aA6GaYloaVpBjL3FbjYd/22EomyjSlUgG/xi/OiMcoZo Z9Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language; bh=XTuENq6jKjUDgKWRJ8gVcuf+yh7+EfexemW+8EuAK1M=; b=qfcx2Z61wCucBome34vv0TfRSBY6ZYGuX8+IwbtVg6RazGRwbyLE/0qD6RGmDSxwCm a3Wo9b7MaYCWb7fHcxRhBV3h8Z/hCySkGT4/r3SkrhzSjSCiO7UYEuy91Z8O6jXhmVG3 ZvUg8WPwlvz1M8JQ1WtxpGMwK4HYeah2RvwNlUltMTZ/UmsOY4OtwIO6RKgfGWIKqaNr dy81UVgyRcDeJ4VLBiQiBZhh2xcULw6cqbAF8WFFzSDSbVBySU6wqG/Z7p2Lo1so40Fb TvIPz4oxyXLIDTrmyZlAazXCNUgQisyXyfKs1t0r/kD1iPAUBYaPeyrJiijmUSTTzeui Swog== X-Gm-Message-State: AOAM5317fo8/1aF1n/mi/IHQ5f28lvGNzXfMcznak7QNghb5K0DJjac6 9rOrLqwfoprVvrgN4inWMQztDTV0tDmBIA== X-Google-Smtp-Source: ABdhPJxaB4OoAcITSi81CyxYWfqnx15Ous9M6FBgyrDvbTo83Ao0qUDbtFljYWaLXNSz6eM04yl4GA== X-Received: by 2002:adf:dc8a:: with SMTP id r10mr1571783wrj.371.1630563698922; Wed, 01 Sep 2021 23:21:38 -0700 (PDT) Received: from Pavie ([2a01:e0a:51e:1cc0:35cd:f4d3:b796:df17]) by smtp.gmail.com with ESMTPSA id g143sm714123wme.16.2021.09.01.23.21.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Sep 2021 23:21:38 -0700 (PDT) From: To: "'Kyotaro Horiguchi'" Cc: References: <053c01d79f1e$f3ed4f10$dbc7ed30$@gmail.com> <20210902.114033.943185538249014089.horikyota.ntt@gmail.com> In-Reply-To: <20210902.114033.943185538249014089.horikyota.ntt@gmail.com> Subject: RE: oldest WAL files not removed Date: Thu, 2 Sep 2021 08:21:37 +0200 Message-ID: <002101d79fc2$c96dff60$5c49fe20$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHfRWajKtAkR9AYPF0Y5X7tLI2YigHlrTS8q3HKthA= Content-Language: fr List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hy Kyotaro, Thanks for this explanation. I joined the files to be complete. Have a good day, Olivier 30/08/2021 20:40 16 777 216 000000010000008E00000088 30/08/2021 20:58 16 777 216 000000010000008E00000089 30/08/2021 21:09 16 777 216 000000010000008E0000008A 30/08/2021 21:24 16 777 216 000000010000008E0000008B 31/08/2021 10:56 16 777 216 000000010000008E0000008D 31/08/2021 11:04 16 777 216 000000010000008E0000008E 31/08/2021 11:05 16 777 216 000000010000008E00000090 31/08/2021 11:05 16 777 216 000000010000008E00000092 31/08/2021 11:05 16 777 216 000000010000008E00000091 31/08/2021 11:12 16 777 216 000000010000008E0000008F 31/08/2021 11:21 16 777 216 000000010000008E00000093 31/08/2021 11:29 16 777 216 000000010000008E00000095 31/08/2021 11:30 16 777 216 000000010000008E00000096 31/08/2021 11:36 16 777 216 000000010000008E00000098 31/08/2021 11:37 16 777 216 000000010000008E00000099 31/08/2021 11:37 16 777 216 000000010000008E0000009A 31/08/2021 11:37 16 777 216 000000010000008E0000009B 31/08/2021 11:37 16 777 216 000000010000008E0000009D 31/08/2021 11:37 16 777 216 000000010000008E0000009E 31/08/2021 11:37 16 777 216 000000010000008E0000009C 31/08/2021 11:37 16 777 216 000000010000008E0000009F 31/08/2021 11:37 16 777 216 000000010000008E000000A0 31/08/2021 11:37 16 777 216 000000010000008E000000A2 31/08/2021 11:37 16 777 216 000000010000008E000000A3 31/08/2021 11:37 16 777 216 000000010000008E000000A4 31/08/2021 11:37 16 777 216 000000010000008E000000A1 31/08/2021 11:37 16 777 216 000000010000008E00000097 31/08/2021 11:38 16 777 216 000000010000008E00000094 31/08/2021 12:08 16 777 216 000000010000008E000000A6 31/08/2021 12:08 16 777 216 000000010000008E000000A8 31/08/2021 12:08 16 777 216 000000010000008E000000A7 31/08/2021 12:12 16 777 216 000000010000008E000000A9 31/08/2021 12:21 16 777 216 000000010000008E000000AC 31/08/2021 12:21 16 777 216 000000010000008E000000AB 31/08/2021 12:21 16 777 216 000000010000008E000000AE 31/08/2021 12:21 16 777 216 000000010000008E000000AD 31/08/2021 12:27 16 777 216 000000010000008E000000AA 31/08/2021 14:27 16 777 216 000000010000008E000000A5 31/08/2021 14:36 16 777 216 000000010000008E000000B0 31/08/2021 14:36 16 777 216 000000010000008E000000B3 31/08/2021 14:36 16 777 216 000000010000008E000000B2 31/08/2021 14:36 16 777 216 000000010000008E000000B5 31/08/2021 14:36 16 777 216 000000010000008E000000B4 31/08/2021 14:42 16 777 216 000000010000008E000000B1 31/08/2021 14:48 16 777 216 000000010000008E000000AF 31/08/2021 14:48 16 777 216 000000010000008E000000B6 31/08/2021 14:55 16 777 216 000000010000008E000000B9 31/08/2021 14:55 16 777 216 000000010000008E000000BB 31/08/2021 14:55 16 777 216 000000010000008E000000BA 31/08/2021 15:02 16 777 216 000000010000008E000000B8 31/08/2021 16:01 16 777 216 000000010000008E000000B7 31/08/2021 16:04 16 777 216 000000010000008E000000BD 31/08/2021 16:11 16 777 216 000000010000008E000000C0 31/08/2021 16:11 16 777 216 000000010000008E000000BF 31/08/2021 16:11 16 777 216 000000010000008E000000C2 31/08/2021 16:11 16 777 216 000000010000008E000000C1 31/08/2021 16:12 16 777 216 000000010000008E0000008C 31/08/2021 16:17 16 777 216 000000010000008E000000BE 31/08/2021 17:31 16 777 216 000000010000008E000000BC 31/08/2021 17:38 16 777 216 000000010000008E000000C4 31/08/2021 17:41 16 777 216 000000010000008E000000C7 31/08/2021 17:41 16 777 216 000000010000008E000000C6 31/08/2021 17:41 16 777 216 000000010000008E000000C5 31/08/2021 17:41 16 777 216 000000010000008E000000C9 31/08/2021 17:47 16 777 216 000000010000008E000000C8 31/08/2021 17:51 16 777 216 000000010000008E000000C3 31/08/2021 17:53 16 777 216 000000010000008E000000CA 31/08/2021 17:58 16 777 216 000000010000008E000000CD 31/08/2021 17:58 16 777 216 000000010000008E000000CC 31/08/2021 17:58 16 777 216 000000010000008E000000CF 31/08/2021 17:58 16 777 216 000000010000008E000000CE 31/08/2021 18:01 16 777 216 000000010000008E000000CB 01/09/2021 12:15 16 777 216 000000010000008E00000061.deleted 01/09/2021 16:35 16 777 216 000000010000008E00000086.deleted 01/09/2021 16:35 16 777 216 000000010000008E00000087 -----Message d'origine----- De=A0: Kyotaro Horiguchi =20 Envoy=E9=A0: jeudi 2 septembre 2021 04:41 =C0=A0: o.lepretre@gmail.com Cc=A0: pgsql-general@postgresql.org Objet=A0: Re: oldest WAL files not removed At Wed, 1 Sep 2021 12:48:51 +0200, wrote in=20 > Hi, >=20 > =20 >=20 > Looking at WAL folder after a crash, I noticed that new files after=20 > restarting overwrite the more recent files before the crash and not=20 > the oldest, which was what I expected. >=20 > Is that normal ? I got only one file marked .deleted. Does that=20 > happens when a WAL file hase been completed updated in the database=20 > and if then while all oldest files aren't marked .deleted after = restarting ? >=20 >=20 > Example : >=20 > Crash occurs Aug 31 22:03 which is the more recent Wal file, the=20 > oldest file is Aug 30 17:20 (and 105 files between those two) >=20 > After restarting Aug 30 17:20 is still there, Aug 31 22:03=20 > disappeared, one new file is Sep 1 12:15 marked .deleted (restarting=20 > date) and one new Sep 1 > 12:36 which I guess is normal. Right now, I see an new wal file and=20 > the previous one marked .deleted which is ok. >=20 > Why are the oldest wal files still there ?? Can I remove them ? >=20 > Hope I'm clear enough and thanks for explanations, It would be very helpful you gave us the name of the files. Due to WAL = file recycling, timestamps are frequently shuffled aginst names. In any case, no WAL files ought to be manually removed. If you don't = need the recycled-for-future files that much, consider reducing min_wal_size. If you looked the files only in timestamp order, with a high odds, the "oldest" file is a recycled file to be used in future, and the "newest" = file is the currently written one. If so, the reason that the oldest-in-timestamp file is still there is it is still waiting to be = used. Even if you removed the to-be-used-in-future files, such files would increase to the same extent according to the setting of min_wal_size. regards. -- Kyotaro Horiguchi NTT Open Source Software Center