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 1hQInX-0007Mg-UN for pgsql-general@arkaria.postgresql.org; Mon, 13 May 2019 21:47:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQInW-0004xP-Ag for pgsql-general@arkaria.postgresql.org; Mon, 13 May 2019 21:47:50 +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 1hQInU-0004xI-G6 for pgsql-general@lists.postgresql.org; Mon, 13 May 2019 21:47:50 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQInR-00019L-8Y for pgsql-general@lists.postgresql.org; Mon, 13 May 2019 21:47:47 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 4968924654; Mon, 13 May 2019 17:47:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 13 May 2019 17:47:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=6 8a/Xl+6XAZUzID5HtcYKQG0TmotUIoNQB3E/0OFdoA=; b=tX/8udX22XpNF1vkN +TjHLK8eqb4AAT4qg2BxB5DTKxYpLiHo0jKOzNh59t2WLWCl0OMBlxdFRb/neBOs W+RVmYjuI0M4s1js/lHQbockDSM/s+qdC6DN6KErNcnqOU1r4DjH+X5nFi6f7Pk6 7SoUkCpdDtivAW6uQqltvd4F/pMYgwhkQhbAHObJFKR2GvcjbctYlPOp0oQVd8MM X7LZ7Dm+VTLuSeHSG1kqV3//hB+piDKTBtNxIstuGVao7tBgtp2LkAToDNapwxtA S66H2KXj73x5IsobIL5qAEX+C7quWIQevhIBlwwa7nj/P6QmrieuAozAcjcoD5LG Hq/eA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=68a/Xl+6XAZUzID5HtcYKQG0TmotUIoNQB3E/0OFd oA=; b=hnAeY4enYluWxLnoDSyeQ+Con3anrwFHPLIDpEkdhstIUApw8FvFqHnp2 5eD5MvBWyhbiRp+sQd/1VXl1dcWsn1voCexRDgSYJ7ztwUkbOZCTaDfdAexxnW8t 4BFy1ZI3Pu1trdL9i0qyz2BGf78cbC3ONbe4jMtYlwAie9Qtu9Kd7GYIc2RCtxz0 m0zRqgAD1gqRO6vH5j6Cym2qeguthZIjgyB/hoM0RLOO0zhV/YVuFQJ0YLdQc/Wq dUfDhahi3kbltz3iHXG86XklJJVB2XEhQn4h7DJLwDEp07QUasuXa4/V5TWTJEXv HdXa5+Lq6UIC8txY8eey3Fvi8TtzA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrleeggdduieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeehnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuffhomhgrihhnpehpohhsthhgrhgvsh hqlhdrohhrghenucfkphepjedurddvuddvrdduhedtrddvtddvnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuve hluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 60FC18005B; Mon, 13 May 2019 17:47:43 -0400 (EDT) Subject: Re: does postgresql backup require additional space on disk To: Julie Nishimura , "pgsql-general@lists.postgresql.org" , pgsql-general References: <86c77c15-c089-a7fb-53d8-a6c14c9cd28a@aklaver.com> From: Adrian Klaver Message-ID: Date: Mon, 13 May 2019 14:47:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/13/19 1:26 PM, Julie Nishimura wrote: > Adrian, thanks for your reply. Couple of clarifications/questions: > 1) we are on 8.3 for this server 8.3 does not have ALTER DATABASE name SET TABLESPACE : https://www.postgresql.org/docs/8.3/sql-alterdatabase.html It does appear until 8.4. > 2) I was under impression, that "ALTER DATABASE name SET TABLESPACE > new_tablespace" won't move anything, and just utilize the new_tablespace > for new tables/indexes. If we would want to move existing tables, we > would need to move them one by one by No think of ALTER DATABASE name SET TABLESPACE as a bulk operation of ALTER TABLE /mytableschema.mytable/ SET TABLESPACE /mynewtablespace/ across all existing tables. This assumes the all existing tables live in the current default tablespace. It is moot in your case as 8.3 is not capable of doing this. > ALTER TABLE /mytableschema.mytable/ SET TABLESPACE /mynewtablespace/ > / > / The above is your option in 8.3. > 3) I thought if I want to have any newly created dbs go to the new vol, > I need to alter template. It is not required you can spec the tablespace in the CREATE DATABASE command: https://www.postgresql.org/docs/8.3/sql-createdatabase.html Though you can move them to make the tablespace the default. See above link. > 4) I was also thinking about changing parameters in config file to point > to the newly volume and reload postgresql.conf > > default_tablespace > > temp_tablespaces You could that. If you do it, moving the template tables would be redundant. > > > Am I wrong here? > > > Thanks, > > Julie > > -- Adrian Klaver adrian.klaver@aklaver.com