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 1lMA8K-0008Gf-RM for pgsql-general@arkaria.postgresql.org; Tue, 16 Mar 2021 13:53:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lMA8J-0003lf-Py for pgsql-general@arkaria.postgresql.org; Tue, 16 Mar 2021 13:53:15 +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 1lMA8J-0003lX-DR for pgsql-general@lists.postgresql.org; Tue, 16 Mar 2021 13:53:15 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lMA8G-0001we-T5 for pgsql-general@lists.postgresql.org; Tue, 16 Mar 2021 13:53:14 +0000 Received: by mail-ed1-x536.google.com with SMTP id bf3so21581683edb.6 for ; Tue, 16 Mar 2021 06:53:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=nKwIFrayVUpwKmtpaNNVuiy5eD94V/Ds9QIqQq02Mbc=; b=mZLCeN7H4o2MAydSOq9wf9O+dyxEyXZZxPoaY/bZfu7kqsgfdxyQ+t4/8aCSvlaWn+ Ttf0CWLuj60KpCha3Pk7FSKWJGTbt2TzCBCFhlYtDAbtgkmzj0C8QpEfBNQgElLCS0cC f5bdi8Ok5Hd7lWVMCoVtzHRd2TM9Xzz6TEgnxskxkOS50NUlBoRHnS6gbTHbEbFh8hMj +mr+gIDqBkTO0ry5FgTxoKG41Cmu+2JPJm8hGBOOJJMwmy3EOaT2toKth8ix62ivWpZy +0iGIo5q6SyF93S96MteIE2hzV6I/5U3lRJqE2X/aD/4KvN41FHeay9UO/u6wD7j8NJq 85ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=nKwIFrayVUpwKmtpaNNVuiy5eD94V/Ds9QIqQq02Mbc=; b=ntl5huoFI6pibs9Y3PcpM2XnVeQiFbLAUfW+han3fB/mlX6sgdDuLgdFfBdH/5NT+Q Om9GiiFydlfVcUeZg6HxsQiA4QRnVFyvxxB/2Zv11K6pUMxT0KGzZpYEBFOPvaem15It P38GwOAT865n1FoT2gxKdd3wHZIUQqpdWh7EZVqsRKvcTEoIRaakWf18ppl0QjCTfLxp 4wH6KUuXSxBbraSFH3lrpNECzCIuteG/7dDgVvcbGbiZM38sY08+rIFKLDrVuGjMhxPa w5vNrNauSfzAF9weYdNJdZPoKs7c8WlSKH0hiIwCxaT8xu0t6n+VnIrhBG6gNIVrUnrr VrzQ== X-Gm-Message-State: AOAM532Vi02/kjVYE082e9j4bMMA4ts8C6Tr9vyJYWhWj2oy48RKtjTS K7gCRTOWOWloBplwAMZ5nYOPUA== X-Google-Smtp-Source: ABdhPJyJcQR+ajRC3mNQth0aTb4AC1eHUmDen4Q7aGH3TmZGAOCKrrdFHV4Ki20kBjeI/zXCjA/FRg== X-Received: by 2002:aa7:cf02:: with SMTP id a2mr35781028edy.59.1615902791271; Tue, 16 Mar 2021 06:53:11 -0700 (PDT) Received: from localhost.localdomain (62-47-144-242.adsl.highway.telekom.at. [62.47.144.242]) by smtp.gmail.com with ESMTPSA id i2sm10592470edy.72.2021.03.16.06.53.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 06:53:11 -0700 (PDT) Message-ID: <2e2b5960cc30345c328206ea374f2faab481a644.camel@cybertec.at> Subject: Re: WAL-files is not removing authomaticaly From: Laurenz Albe To: Andrew Anderson Cc: "pgsql-generallists.postgresql.org" Date: Tue, 16 Mar 2021 14:53:10 +0100 In-Reply-To: References: <7eee13c535a2f1de6e8dece0791531f3dc7f2c0e.camel@cybertec.at> <8824049ee9e1f6476cf65ebb156c71fb2b44fa87.camel@cybertec.at> <033b46e968f6968cb4e3591c2111aaf20ec4b067.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2021-03-16 at 15:31 +0200, Andrew Anderson wrote: > вт, 16 мар. 2021 г. в 14:21, Laurenz Albe : > > On Tue, 2021-03-16 at 09:49 +0200, Andrew Anderson wrote: > > > 2021-03-16 09:44:03.997 EET [97581] [] [] [] []DEBUG: attempting to remove WAL segments older than log file 000000000000013E00000097 > > > > That was the entry I was hoping to see. > > > > So, are all older WAL segments deleted or recycled? > > Is that a reasonably recent WAL segment? > > but there is files with very old time of creation: > $ ls -lart pg_wal/ > total 30933220 > -rw------- 1 postgres postgres 299 Dec 30 05:44 000000020000013E00000097.00000108.backup > -rw------- 1 postgres postgres 16777216 Dec 30 06:12 000000010000000000000001 > -rw------- 1 postgres postgres 16777216 Dec 30 06:12 000000020000013E00000098 > -rw------- 1 postgres postgres 44 Dec 30 06:29 00000002.history > -rw------- 1 postgres postgres 16777216 Dec 30 06:29 000000020000013E00000099 > -rw------- 1 postgres postgres 16777216 Dec 30 09:01 000000020000013E0000009A > -rw------- 1 postgres postgres 16777216 Dec 30 09:57 000000020000013E0000009B > ..... till now ..... > -rw------- 1 postgres postgres 16777216 Mar 16 12:59 0000000200000145000000F2 > -rw------- 1 postgres postgres 16777216 Mar 16 13:50 0000000200000145000000F3 > -rw------- 1 postgres postgres 16777216 Mar 16 14:39 0000000200000145000000F4 > drwx------ 2 postgres postgres 118784 Mar 16 14:39 archive_status > -rw------- 1 postgres postgres 16777216 Mar 16 15:19 0000000200000145000000F6 > drwx------ 3 postgres postgres 94208 Mar 16 15:19 . > -rw------- 1 postgres postgres 16777216 Mar 16 15:25 0000000200000145000000F5 > drwx------ 19 postgres postgres 4096 Mar 16 15:25 .. > > and on master current WAL-file: > postgres=# select pg_walfile_name(pg_current_wal_lsn()); > pg_walfile_name > -------------------------- > 0000000200000145000000F6 > (1 row) These things hold up deletion of WAL segments: - checkpoint (not the problem here) - replication slot (you said that is not it) - archiver failure (also doesn't seem to be the problem) - wal_keep_segments / wal_keep_size: what is your setting? Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com