From: Karsten Hilbert <Karsten.Hilbert@gmx.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: does postgresql backup require additional space on disk
Date: Mon, 13 May 2019 23:12:37 +0200
Message-ID: <20190513211237.GA1963@hermes.hilbert.loc> (raw)
In-Reply-To: <BYAPR08MB50143AA1AD0D453066431EDCAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com>
References: <BYAPR08MB5014E959330C8E249341F66CAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com>
<d8c3b0a7-c193-3742-d20e-ba046dcf88cb@aklaver.com>
<BYAPR08MB50143AA1AD0D453066431EDCAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com>
On Mon, May 13, 2019 at 07:33:58PM +0000, Julie Nishimura wrote:
> We have added new disk volume and about to introduce new
> tablespace using this additional disk space. After that, I am
> going to alter all user dbs (and template db as well) by
> runnig the following command:
>
> CREATE TABLESPACE vol4
> OWNER postgres
> LOCATION '/data/vol4';
>
> ALTER DATABASE user_db_1
> SET default_tablespace = 'vol4';
>
> ...for all dbs..
>
> We have more than 70 different databases (the entire server
> is about 20 tb). However, for the largest dbs (16tb, 4 tb,
> and 3 tb), we do not have valid backups, unfortunately. So,
> we were debating if we need to run backups first before
> introducing all these changes. But we have only 1% left
> (about 200 gb).
You could move those databases first for which you do have
backups which should free up space in the old tablespace.
Then take backups of and move the remaining databases,
perhaps one by one.
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: Karsten.Hilbert@gmx.net
Subject: Re: does postgresql backup require additional space on disk
In-Reply-To: <20190513211237.GA1963@hermes.hilbert.loc>
References: <BYAPR08MB5014E959330C8E249341F66CAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com> <d8c3b0a7-c193-3742-d20e-ba046dcf88cb@aklaver.com> <BYAPR08MB50143AA1AD0D453066431EDCAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com> <20190513211237.GA1963@hermes.hilbert.loc>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox