Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQIFc-0005RN-8Z for pgsql-general@arkaria.postgresql.org; Mon, 13 May 2019 21:12:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQIFb-0005hG-40 for pgsql-general@arkaria.postgresql.org; Mon, 13 May 2019 21:12:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQIFa-0005h8-Jp for pgsql-general@lists.postgresql.org; Mon, 13 May 2019 21:12:46 +0000 Received: from mout.gmx.net ([212.227.17.20]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQIFX-0000Nm-Hd for pgsql-general@lists.postgresql.org; Mon, 13 May 2019 21:12:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1557781959; bh=hMyo56NEUUFO4SH8/fC86cMp2tgJ+yg8WXGMWvOtp/I=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=Qc8m5+7IWmb3PJWJkkZN/1WuzIRTXdKWA6o0cst6UpieOPHZ9jlFa1Egnl6BcSPYd Ls/49aW+gg9rt3r0q1f6tvyNmS3QtP6qZxTuKwbHLOuHxdEkgBKv7skTxCUnP+BZ40 Zo+dtb8mGMMNT7TjJZUh8wlusSIFeCHsLWLn/WxQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from hermes ([78.54.80.68]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LaJWs-1gzEN63NMM-00m6Xm for ; Mon, 13 May 2019 23:12:39 +0200 Received: from ncq by hermes with local (Exim 4.92) (envelope-from ) id 1hQIFR-00041o-JZ for pgsql-general@lists.postgresql.org; Mon, 13 May 2019 23:12:37 +0200 Date: Mon, 13 May 2019 23:12:37 +0200 From: Karsten Hilbert To: pgsql-general@lists.postgresql.org Subject: Re: does postgresql backup require additional space on disk Message-ID: <20190513211237.GA1963@hermes.hilbert.loc> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) User-Agent: Mutt/1.10.1 (2018-07-13) Sender: X-Provags-ID: V03:K1:wa3Yb+rGaszv4OsIeqHjjpkdF1Jmo1j+xEHBo474T4+V4tSQAq9 t+Tg99o11+zPqXBbK0WyPLKqvwJvOS2O24iYZCE34XYy9sS0P32WBQ5Lwi/t7BnKd5IIW2B b5Iy8usFlAiqqqHQv1bZ6YZynS00y1zsgxWZ7UO3iJcxyhznU7JbEDTJ/6MAQOwQGUPZe+8 5DZtKOGNPaeSF+OMKvUNA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:geFdMmSQCAs=:cWHnxusTfbP+SzJZKj+7V6 F8RzFIJiknGyfOHlkJ70lwDgnFeCX7xrKUWJJHetXqWfzk1FNRDeGU9uu8d3ZL+7W93ul80tl q1ouWrKKBnlJB5CBWuvCff9oL6dbX7UDrJr+oYOgHqFy4Q/Q+8dHogxd2pKAswip1XminIS+l sccLwpXZgzb4bMAWIfHepr/+poUrzwpNWbKTx0qmjrQp1XMMqHxMxeLfyi4dNH/QrRjNTQQ7g VCnbScR31KTozRcqjNUTKoPIAokaPW52XxDJKQm6f0A9qddFKuD6kuGUKiBMb3VpFGSqYFQKu 7c+drErfCxpvXfUHhe+aDMd9aKi20td+zNgAwRDF5yfv3X6eOnCh71u3w0yCasBLNeQHWFbFG IMpRVoigTukm2BJR9v6RcBHUE9g04cC3tvJxG9SwYuO9oh8WjmJmvWikn/5whNHwx3ZyZ2VeR Nnaj5VoOD2KRH59oEhAFdXBq++QSd7bGPvKiEucf1M0uEPTsxrARdEsyNHR7vRK6CsXVjD10i UxU5hFyKk74jlZyHGkeVnO2ILL55J3fDhHPNzxCXG6SQrH+qyrENGPmlvDAl9Vgt7IJeXQJ8x 7WlPhf2gXRtc2bvxFYI/EzNBjFSLEuF1UwVomGT6VH7sN9/mu0cfIP9d5nJa/Q3muk+SuyXBz Hx7erdpYnPDCNd8pt4E7hw9pelNP+fMnUk2mNS8IPXYfBlUn2gKW9RL8lhmGx1WqPIFxEYJaW ZNpziZ0Z4yE+YvgnWj5OykOFHK1wte2JZiHM52xHLw3Lt041ivdbDY2RHA14IEwATa3Mw74L+ s48jNjYZLFar0yTJBzdYt1dU/vBT6L6WW2re3BxDopF/PIia9lgEnYYgGzgE1unPMcW/8lAxF 8ffx4YvLczVVLehUMBeDyTMAyXhvJjpYLVfbRsUaTsALBh7MTaG+buONNmGvKy Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 =3D '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 =2D- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B