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 1lMBrs-0003zd-Tz for pgsql-general@arkaria.postgresql.org; Tue, 16 Mar 2021 15:44:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lMBrr-0000QK-Ru for pgsql-general@arkaria.postgresql.org; Tue, 16 Mar 2021 15:44:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMBrr-0000QD-KF for pgsql-general@lists.postgresql.org; Tue, 16 Mar 2021 15:44:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMBrp-0002YB-PN for pgsql-general@lists.postgresql.org; Tue, 16 Mar 2021 15:44:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 12GFiID23253338; Tue, 16 Mar 2021 11:44:18 -0400 From: Tom Lane To: Andrew Anderson cc: Laurenz Albe , "pgsql-generallists.postgresql.org" Subject: Re: WAL-files is not removing authomaticaly In-reply-to: References: <7eee13c535a2f1de6e8dece0791531f3dc7f2c0e.camel@cybertec.at> <8824049ee9e1f6476cf65ebb156c71fb2b44fa87.camel@cybertec.at> <033b46e968f6968cb4e3591c2111aaf20ec4b067.camel@cybertec.at> <2e2b5960cc30345c328206ea374f2faab481a644.camel@cybertec.at> Comments: In-reply-to Andrew Anderson message dated "Tue, 16 Mar 2021 16:13:37 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3253336.1615909458.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 16 Mar 2021 11:44:18 -0400 Message-ID: <3253337.1615909458@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Anderson writes: >> - replication slot (you said that is not it) > The replication slot is the same on master: > postgres=3D# select * from pg_replication_slots ; > slot_name | plugin | slot_type | datoid | database | temporary | > active | active_pid | xmin | catalog_xmin | restart_lsn | > confirmed_flush_lsn > ------------------+--------+-----------+--------+----------+-----------+= --------+------------+------+--------------+--------------+---------------= ------ > stanby_slot | | physical | | | f | t > | 94341 | | | 145/F6ECC190 | > (1 row) > $ grep slot ${PGDATA}/recovery.done > primary_slot_name =3D 'stanby_slot' > and on slave: > postgres=3D# select * from pg_replication_slots ; > slot_name | plugin | slot_type | datoid | database | temporary | > active | active_pid | xmin | catalog_xmin | restart_lsn | > confirmed_flush_lsn > ------------------+--------+-----------+--------+----------+-----------+= --------+------------+------+--------------+--------------+---------------= ------ > stanby_slot | | physical | | | f | f > | | | | 13E/981E2DD0 | > (1 row) > $ grep slot ${PGDATA}/recovery.conf > primary_slot_name =3D 'stanby_slot' Uh ... that slot's restart_lsn seems to correspond to where the standby is refusing to truncate WAL beyond. So I think your problem is exactly that this slot isn't advancing. What's using it? regards, tom lane