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 1kmHXz-0006G7-Vh for pgsql-admin@arkaria.postgresql.org; Mon, 07 Dec 2020 14:31:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kmHXy-000335-U4 for pgsql-admin@arkaria.postgresql.org; Mon, 07 Dec 2020 14:31:26 +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 1kmHXy-00032x-KT for pgsql-admin@lists.postgresql.org; Mon, 07 Dec 2020 14:31:26 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kmHXw-0004TT-Jz for pgsql-admin@lists.postgresql.org; Mon, 07 Dec 2020 14:31:25 +0000 Received: by mail-ed1-x52c.google.com with SMTP id h16so2603997edt.7 for ; Mon, 07 Dec 2020 06:31:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=EQg7knfD8hMqeQBzr2Ed9zOMb9x1sB1ZHKv/krBlsMM=; b=JT6Fpzf6rbhCAN9T3O7/zL1/D4WolQWDpvrK+sn+QO56ok+NO59tKM8fJ/0UIawJcd XOPqe02gwyPPz55TvkQKgqEBGMLfZ2C8+0aUQD8kYfYAf/O2aHN0YjYMbN5UHUeTOSud h0ua5AlkS4cXpYt3weaPovw/jdKuFojtrvNYeFzEgaei6ej+ahLra4IjdCvFm/Mf2CgO aj0WPJeP89f5fCUrMZu3WsB09p0Uki01OIy3fna/fFMlJq3A0/A9+O3F3xhhxaQULpY9 gsricfne3ghqoNW4mDoz5Cd4bpYWJ+LdguOI9JkK5Isa1dEYjIiukUsur3ScG3ybuIvT bDZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=EQg7knfD8hMqeQBzr2Ed9zOMb9x1sB1ZHKv/krBlsMM=; b=py6997H3YxlBYdEEnoLf0X9bhHIEti34vi7hiCHpi+GrNkYGbperDAkq30Hrq5i4K2 xOBtMpNayoYCmcQd3FkmXEV8Lv2IpeZGEoKl+Dj3/ivnxllzzAcyeH6ygabt8mmgRXfE bU99kk/h5w7yppYZk624+wxXznU8bu64wigujkLbfgJXmnrWTd+K8G3mVTmqFb7qx9rk Nfz6O1TOOjxoSuq8oIV4SDPw1MXf4OSy0qZReqsS9Ly/VbF/x3Z5iJ9wpnsq0Az7Ihlq kL8Xs37J1FFuF4xY5z4JsTRs+aKdgoe+n2WPn6kQyNmk97vn4J6q20UJYG28HbFM52gt JyHQ== X-Gm-Message-State: AOAM533VOPxej2EynLdhnc2qzOgXTc1XwIJSce0bjiVNGbt3AyaJtVRZ /zJRc4uPbx9uxgn0dGLS4Po= X-Google-Smtp-Source: ABdhPJyOF5vv37d2Ca7lxIVANufu701YHThMDDTr87KjHswljdnQ0lVgj2keoVWTeIR8i8Kj8sVYyQ== X-Received: by 2002:aa7:cc14:: with SMTP id q20mr20829752edt.140.1607351483221; Mon, 07 Dec 2020 06:31:23 -0800 (PST) Received: from [192.168.1.8] (241-57-239-77.dyn.cable.fcom.ch. [77.239.57.241]) by smtp.gmail.com with ESMTPSA id d14sm13457665edu.63.2020.12.07.06.31.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Dec 2020 06:31:22 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.21\)) Subject: Re: Archive directory From: =?utf-8?Q?Paul_F=C3=B6rster?= In-Reply-To: <9076CFB7-5E9B-4458-AD4F-BC94AE3B6A0F@elevated-dev.com> Date: Mon, 7 Dec 2020 15:31:21 +0100 Cc: Yambu , Ian Lawrence Barwick , Pgsql-admin Content-Transfer-Encoding: quoted-printable Message-Id: References: <5AAB0FED-45AA-45F6-AFB5-A65A36275492@elevated-dev.com> <92588443-EB0E-412B-B768-301603D21CCA@gmail.com> <9076CFB7-5E9B-4458-AD4F-BC94AE3B6A0F@elevated-dev.com> To: Scott Ribe X-Mailer: Apple Mail (2.3654.20.0.2.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Scott, hi Yambu, > On 07. Dec, 2020, at 15:11, Scott Ribe = wrote: >=20 >> On Dec 7, 2020, at 7:02 AM, Paul F=C3=B6rster = wrote: >>=20 >> in my understanding, this is only true if you don't use replication = slots. If you use replication slots then the primary should know when a = WAL file is no longer needed and abandoned or ready to be recycled. >=20 > I don't think OP is talking about the WAL files PG is managing; I = think he's talking about WAL files copied into an archive directory. if those files already archived to some destination are referred to, = then yes, you can do with them whatever you want. They can be removed if = they are not needed for a PITR. For example, we remove them time-based. Files older than a certain = number of days are removed (cron job, note: the job only removes files = in the archive destination, NOT in ${PGDATA}/pg_wal). Cheers, Paul=