Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOtud-0007l8-0U for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Dec 2017 23:24:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOtuc-0006Em-8X for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Dec 2017 23:24:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eOtuc-0006Ed-2J for pgsql-hackers@lists.postgresql.org; Tue, 12 Dec 2017 23:24:34 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eOtuV-0006IY-Bl for pgsql-hackers@lists.postgresql.org; Tue, 12 Dec 2017 23:24:33 +0000 Received: from Davids-MacBook.local (c-68-33-78-252.hsd1.md.comcast.net [68.33.78.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 4563154669 for ; Tue, 12 Dec 2017 23:24:25 +0000 (UTC) Subject: Re: PATCH: Exclude unlogged tables from base backups To: pgsql-hackers@lists.postgresql.org References: <04791bab-cb04-ba43-e9c0-664a4c1ffb2c@pgmasters.net> <20171212225234.jqdwd4sp663l4znp@alap3.anarazel.de> <5e428ad7-f37f-6479-aabf-2c8b9318fb79@pgmasters.net> From: David Steele Message-ID: Date: Tue, 12 Dec 2017 18:24:23 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Michael, On 12/12/17 6:08 PM, Michael Paquier wrote: > >> If the forks are written out of order (i.e. main before init), which is >> definitely possible, then I think worst case is some files will be backed up >> that don't need to be. The main fork is unlikely to be very large at that >> point so it doesn't seem like a big deal. > > As far as I recall the init forks are logged before the main forks. I > don't think that we should rely on that assumption though to be always > satisfied. Indeed, nothing is sure until a checkpoint. Until then we must assume writes are random. >> Well, I would be happy if you had a look! > > You can count me in. I think that this patch has value for some > dedicated workloads. Thanks! > It is a waste to backup stuff that will be > removed at recovery anyway. It also causes confusion when the recovered database is smaller than the backup. I can't tell you how many times I have answered this question... -- -David david@pgmasters.net