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 1hOliA-0001wi-TU for pgsql-general@arkaria.postgresql.org; Thu, 09 May 2019 16:15:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hOli9-0002GQ-NM for pgsql-general@arkaria.postgresql.org; Thu, 09 May 2019 16:15:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOli9-0002GI-B5 for pgsql-general@lists.postgresql.org; Thu, 09 May 2019 16:15:57 +0000 Received: from athena.simkin.ca ([2607:f040:1001:2::ff:2]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOli3-0003nf-UY for pgsql-general@postgresql.org; Thu, 09 May 2019 16:15:56 +0000 Received: from skynet.simkin.ca (skynet.simkin.ca [IPv6:2607:f040:1001:103::1000]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by athena.simkin.ca (Postfix) with ESMTPSA id 6DE7ADC696E7; Thu, 9 May 2019 09:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.simkin.ca; s=athena; t=1557418548; bh=NVZfxQ9ZIsjQkTS2HicFrFkElxuceC0ub8pOxyWovsc=; h=Subject:From:To:Date:From:To:Subject:Date:Reply-To; b=Ptmkw0yGIZjsDx4RVZICGCcQogpoGgpuW0ijZhDgiToNO2KxgyxqTratTW9AXE/is McS0L1ZmetFeQhrqMeKF15QcGqxb4fzrOL6AQptCxabcWOjZtRF9Du04ylgSUlFN2c N66UiDY+vvYIuXi9qpC1DxhPN5RxIQcOEQiIEq4xmBAY8ELl51NOGaf7EmmYdQUInC fm6YhgIpZ0ouTPonwo7ivIcsFNTKC23YhxtCNjlAa3zByO+fRGEl0+xWK/BYOYd2He oHAO6/jIq7sDhE7wWrCP9lrqtucPJk5ACuNomXwCvCgXC6JoAVaM2LGaCrRAcTt4WR GiY7Y20GTfGow== Received: from skynet.simkin.ca (skynet.simkin.ca [IPv6:::1]) by skynet.simkin.ca (Postfix) with ESMTP id 375CF21A5CB83; Thu, 9 May 2019 09:15:47 -0700 (PDT) Message-ID: Subject: Re: running out of disk space From: Alan Hodgson To: Julie Nishimura , pgsql-general Date: Thu, 09 May 2019 09:15:46 -0700 In-Reply-To: References: Content-Type: multipart/alternative; boundary="=-hTxIU91V+7h+AN5Zi0lo" User-Agent: Evolution 3.30.5 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-hTxIU91V+7h+AN5Zi0lo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Thu, 2019-05-09 at 15:46 +0000, Julie Nishimura wrote: > hello, > > We are running out of disk space, and we introduced new volume to it. > I am about to create new tablespace X and alter user databases to set > to this new tablespace X. So, all new tables will be created in X, > but what about existing tables on previous volume? > Its data will be split between 2 tbspaces? > > > > > > > > Please clarify. Thank you! > > > > Tables and indexes can only be on one tablespace. You'll need to individually move them with alter table and alter index. They will be locked while being moved. You should experiment with this on a test server to learn how it works. However, unless your new volume has different I/O characteristics than the existing volume you really shouldn't use tablespaces. You should use your OS volume manager and filesystem tools to extend the data volume and filesystem into the new space. This will be much easier to manage. I'm sure your system administrator can assist you with this. --=-hTxIU91V+7h+AN5Zi0lo Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
On Thu, 20= 19-05-09 at 15:46 +0000, Julie Nishimura wrote:
hello,
We are running out of disk space, and we introduced new volume to it. I am = about to create new tablespace X and alter user databases to set to this ne= w tablespace X. So, all new tables will be created in X, but what about exi= sting tables on previous volume? Its data will be split between 2 tbspaces?

Please clarify. Thank you!

Tables and indexes can only be on one tabl= espace. You'll need to individually move them with alter table and alter in= dex. They will be locked while being moved. You should experiment with this= on a test server to learn how it works.

However, = unless your new volume has different I/O characteristics than the existing = volume you really shouldn't use tablespaces. You should use your OS volume = manager and filesystem tools to extend the data volume and filesystem into = the new space. This will be much easier to manage. I'm sure your system adm= inistrator can assist you with this.
--=-hTxIU91V+7h+AN5Zi0lo--