Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9oTj-0003ki-LM for pgsql-general@arkaria.postgresql.org; Tue, 09 Oct 2018 09:38:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g9oTh-0001C1-G0 for pgsql-general@arkaria.postgresql.org; Tue, 09 Oct 2018 09:38:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9iyH-0001mS-Mo for pgsql-general@lists.postgresql.org; Tue, 09 Oct 2018 03:46:09 +0000 Received: from mail3-166.sinamail.sina.com.cn ([202.108.3.166]) by makus.postgresql.org with smtp (Exim 4.89) (envelope-from ) id 1g9iyB-00015S-H8 for pgsql-general@postgresql.org; Tue, 09 Oct 2018 03:46:06 +0000 Received: from unknown (HELO t460p)([120.132.1.226]) by sina.com with ESMTP id 5BBC246C000060D9; Tue, 9 Oct 2018 11:45:51 +0800 (CST) X-Sender: wztdyl@sina.com X-Auth-ID: wztdyl@sina.com X-SMAIL-MID: 505918393730 Message-ID: <4691e0cffc49fa1438de904ec5429b310d74c654.camel@sina.com> Subject: Re: pg9.6: no backup history file (*.backup) created on hot standby From: magodo To: Michael Paquier Cc: Postgres general Date: Tue, 09 Oct 2018 11:45:50 +0800 In-Reply-To: <20181009024504.GB2137@paquier.xyz> References: <6ac35bd51a0a4faad011fab162a2888a09ab2dd7.camel@sina.com> <20181008092451.GE2754@paquier.xyz> <55036790ed3c8c900d674bf90dfbdd65f6ab170f.camel@sina.com> <20181009024504.GB2137@paquier.xyz> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, 2018-10-09 at 11:45 +0900, Michael Paquier wrote: > (Please do not forget to add the community mailing list in CC.) > > On Tue, Oct 09, 2018 at 10:33:56AM +0800, magodo wrote: > > Since the backup history aims to aid administrator to identify the > > point from which wal archive should be kept and before which the > > archive could be cleaned. It is very helpful in kinds of use cases. > > > > Why not also create it when do basebackup on standby? > > The backup_label file is equally helpful, and backup history files > are > not mandatory for backups. One of the reasons behind why we cannot > have > those on standbys is that there is no actual way to ensure the > uniqueness of this file, as two backups could be started in parallel > with the same start location and the *same* file name. If an archive > command is not able to handle correctly the duplicates, you could > bloat > pg_wal. And that's a real problem. > -- > Michael Oh, I almost forget backup_label.. Thank you for point it out! Yet, I am still not so clear how does the bloat of pg_wal happen? Do you mean pg_wal will be filled up by many .backup(s)? Magodo