Re: PATCH: Exclude unlogged tables from base backups - Mailing list pgsql-hackers

From David Steele
Subject Re: PATCH: Exclude unlogged tables from base backups
Date
Msg-id b5b63d5c-2552-4b13-0fe5-844901eefeea@pgmasters.net
Whole thread Raw
In response to Re: PATCH: Exclude unlogged tables from base backups  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: PATCH: Exclude unlogged tables from base backups
Next
From: Michael Paquier
Date:
Subject: Re: money type's overflow handling is woefully incomplete