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 1jON3E-0004M3-NH for pgsql-general@arkaria.postgresql.org; Tue, 14 Apr 2020 15:00:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jON3D-0005nh-3H for pgsql-general@arkaria.postgresql.org; Tue, 14 Apr 2020 15:00:35 +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 1jON3C-0005na-S5 for pgsql-general@lists.postgresql.org; Tue, 14 Apr 2020 15:00:34 +0000 Received: from smh-06.1blu.de ([178.254.0.206]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jON39-0000Ki-Sf for pgsql-general@lists.postgresql.org; Tue, 14 Apr 2020 15:00:33 +0000 Received: from [172.16.29.5] (helo=sh4-5.1blu.de) by smh-06.1blu.de with esmtp (Exim 4.86_2) (envelope-from ) id 1jON30-0007Ca-OV for pgsql-general@lists.postgresql.org; Tue, 14 Apr 2020 17:00:28 +0200 Received: from ftp51246-2575596 by sh4-5.1blu.de with local (Exim 4.90_1) (envelope-from ) id 1jON30-0001vD-Mc for pgsql-general@lists.postgresql.org; Tue, 14 Apr 2020 17:00:22 +0200 Date: Tue, 14 Apr 2020 17:00:22 +0200 From: Matthias Apitz To: pgsql-general@lists.postgresql.org Subject: pg_basebackup && long time storage of wal_archive/ content Message-ID: <20200414150022.GA4613@sh4-5.1blu.de> Reply-To: Matthias Apitz MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Operating-System: FreeBSD 12.0-CURRENT r314251 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, The run (as user 'postgres') on the server of the cmd: pg_basebackup -U ${DBSUSER} -Ft -z -D /data/postgresql11/backup-wal_archive-20200414-1/ produces correctly the following situtation on the server: srap32dxr1:/data/postgresql11 # ls -ltrh backup-20200414-1 total 1.7G -rw------- 1 postgres postgres 1.7G Apr 14 16:20 base.tar.gz -rw------- 1 postgres postgres 17K Apr 14 16:20 pg_wal.tar.gz srap32dxr1:/data/postgresql11 # ls -ltrh data/pg_wal total 81M -rw------- 1 postgres postgres 16M Apr 14 15:11 000000010000000C0000009F -rw------- 1 postgres postgres 16M Apr 14 15:20 000000010000000C000000A0 -rw------- 1 postgres postgres 16M Apr 14 16:10 000000010000000C000000A1 -rw------- 1 postgres postgres 16M Apr 14 16:20 000000010000000C000000A2 -rw------- 1 postgres postgres 342 Apr 14 16:20 000000010000000C0000009D.00000028.backup drwx------ 2 postgres postgres 36K Apr 14 16:25 archive_status -rw------- 1 postgres postgres 16M Apr 14 16:50 000000010000000C0000009E srap32dxr1:/data/postgresql11 # ls -ltrh wal_archive/ total 49M -rw------- 1 postgres postgres 16M Apr 14 15:20 000000010000000C0000009B -rw------- 1 postgres postgres 16M Apr 14 16:10 000000010000000C0000009C -rw------- 1 postgres postgres 16M Apr 14 16:20 000000010000000C0000009D -rw------- 1 postgres postgres 342 Apr 14 16:20 000000010000000C0000009D.00000028.backup The content of the dir wal_archive/ is growing and growing over the time. The pg_wat.tar.gz contains: srap32dxr1:/data/postgresql11 # tar tzf backup-20200414-1/pg_wal.tar.gz 000000010000000C0000009D i..e. the files 000000010000000C0000009B ... 000000010000000C0000009D could be removed in wal_archive/ Correct? Or how is the long time storage of this dir? matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub