From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Andrew Anderson <forumwriter007@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: WAL-files is not removing authomaticaly
Date: Tue, 16 Mar 2021 14:53:10 +0100
Message-ID: <2e2b5960cc30345c328206ea374f2faab481a644.camel@cybertec.at> (raw)
In-Reply-To: <CAHAzDi=Ypsg--1L4H9sj03HbtSjTy_8u59LMeLD2O2ZozLASYw@mail.gmail.com>
References: <CAHAzDi=7s2UpiFKQyQb+yNqFLaL3jrH=n2z=f52U8fc=QXbc7Q@mail.gmail.com>
<7eee13c535a2f1de6e8dece0791531f3dc7f2c0e.camel@cybertec.at>
<CAHAzDikSTvg5y8u-sNbpTNtQ_p3jWjhJBzPDMW1pU5T1x-MKFQ@mail.gmail.com>
<8824049ee9e1f6476cf65ebb156c71fb2b44fa87.camel@cybertec.at>
<CAHAzDi=2pGm6mQsH1CYdiLT=Q204bRtzMTGZEDfqiZ4ggyAabA@mail.gmail.com>
<d4c888efc4851c6a2a5692d2ac7e26e187164e40.camel@cybertec.at>
<CAHAzDi=GfBtes3Ed9qgOjy81F8c00XXMAF7BjK_t2=-FotADQw@mail.gmail.com>
<033b46e968f6968cb4e3591c2111aaf20ec4b067.camel@cybertec.at>
<CAHAzDi=Ypsg--1L4H9sj03HbtSjTy_8u59LMeLD2O2ZozLASYw@mail.gmail.com>
On Tue, 2021-03-16 at 15:31 +0200, Andrew Anderson wrote:
> вт, 16 мар. 2021 г. в 14:21, Laurenz Albe <laurenz.albe@cybertec.at>:
> > 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, forumwriter007@gmail.com
Subject: Re: WAL-files is not removing authomaticaly
In-Reply-To: <2e2b5960cc30345c328206ea374f2faab481a644.camel@cybertec.at>
References: <CAHAzDi=7s2UpiFKQyQb+yNqFLaL3jrH=n2z=f52U8fc=QXbc7Q@mail.gmail.com> <7eee13c535a2f1de6e8dece0791531f3dc7f2c0e.camel@cybertec.at> <CAHAzDikSTvg5y8u-sNbpTNtQ_p3jWjhJBzPDMW1pU5T1x-MKFQ@mail.gmail.com> <8824049ee9e1f6476cf65ebb156c71fb2b44fa87.camel@cybertec.at> <CAHAzDi=2pGm6mQsH1CYdiLT=Q204bRtzMTGZEDfqiZ4ggyAabA@mail.gmail.com> <d4c888efc4851c6a2a5692d2ac7e26e187164e40.camel@cybertec.at> <CAHAzDi=GfBtes3Ed9qgOjy81F8c00XXMAF7BjK_t2=-FotADQw@mail.gmail.com> <033b46e968f6968cb4e3591c2111aaf20ec4b067.camel@cybertec.at> <CAHAzDi=Ypsg--1L4H9sj03HbtSjTy_8u59LMeLD2O2ZozLASYw@mail.gmail.com> <2e2b5960cc30345c328206ea374f2faab481a644.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox