Re: PATCH: Exclude unlogged tables from base backups

From: David Steele <david(at)pgmasters(dot)net>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: PATCH: Exclude unlogged tables from base backups
Date: 2017-12-12 23:24:23
Message-ID: b5b63d5c-2552-4b13-0fe5-844901eefeea@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)pgmasters(dot)net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-12-12 23:27:42 Re: money type's overflow handling is woefully incomplete
Previous Message Andres Freund 2017-12-12 23:21:54 Re: PATCH: Exclude unlogged tables from base backups