Re: basebackups during ALTER DATABASE ... SET TABLESPACE ... not safe? - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: basebackups during ALTER DATABASE ... SET TABLESPACE ... not safe?
Date
Msg-id 54C29853.9070903@BlueTreble.com
Whole thread Raw
In response to Re: basebackups during ALTER DATABASE ... SET TABLESPACE ... not safe?  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: basebackups during ALTER DATABASE ... SET TABLESPACE ... not safe?
List 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
andprobably 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
tablespaceswhile 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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_upgrade and rsync
Next
From: Stephen Frost
Date:
Subject: Re: pg_upgrade and rsync