Re: basebackups during ALTER DATABASE ... SET TABLESPACE ... not safe?

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: basebackups during ALTER DATABASE ... SET TABLESPACE ... not safe?
Date: 2015-01-23 18:52:03
Message-ID: 54C29853.9070903@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/22/15 3:18 PM, Andres Freund wrote:
>> , but to then put it's entire contents into WAL? Blech.
> Besides actually having a chance of being correct, doing so will save
> having to do two checkpoints inside movedb(). I think it's pretty likely
> that that actually saves overall IO, even including the WAL
> writes. Especially if there's other databases in the cluster at the same
> time.

If you're moving a small amount of data, maybe. If you're moving several hundred GB or more? You're going to flood WAL and probably cause all replication/archiving to lag.

Obviously, we need to do be reliable, but I think a lot of users would much rather that they can't muck with tablespaces while a backup is running than an ADAT suddenly consumes way more resources than before.

Is there some way we can add an option to control this? I'm thinking that by default ADAT will error if a backup is running, but allow the user to over-ride that.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2015-01-23 18:52:54 Re: pg_upgrade and rsync
Previous Message Andres Freund 2015-01-23 18:48:53 Re: pg_upgrade and rsync