pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Devrim Gündüz <devrim@gunduz.org>
To: nikhil raj <nikhilraj474@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: A particular database to move to other drive
Date: Mon, 27 Nov 2017 10:18:47 +0000
Message-ID: <1511777927.30710.8.camel@gunduz.org> (raw)
In-Reply-To: <CAG1ps1yfrgyjyWkOgwUxriEFO4vmwt8CBJ6eJoTQ_Kg9qxp2Vg@mail.gmail.com>
References: <CAG1ps1yfrgyjyWkOgwUxriEFO4vmwt8CBJ6eJoTQ_Kg9qxp2Vg@mail.gmail.com>


Hi,

On Sun, 2017-11-26 at 01:08 +0530, nikhil raj wrote:
> I want to move a database to 'Y drive' because the size of that database is
> large about so can I move only that database to because I got an alert of
> low space is there any way
> Currently it is on F drive I want to move to Y drive .

First, create a new tablespace on Y drive:

https://www.postgresql.org/docs/current/static/sql-createtablespace.html

Then, move the database to that tablespace:

ALTER DATABASE dbname SET TABLESPACE to new_tablespace_name;

Regards,
-- 
Devrim Gündüz
EnterpriseDB: https://www.enterprisedb.com
PostgreSQL Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (10+ messages)  latest in thread

Message-ID: <1511777927.30710.8.camel@gunduz.org>
Permalink:  ../1511777927.30710.8.camel@gunduz.org/
Also on:    postgresql.org/message-id/1511777927.30710.8.camel@gunduz.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: devrim@gunduz.org, nikhilraj474@gmail.com
  Subject: Re: A particular database to move to other drive
  In-Reply-To: <1511777927.30710.8.camel@gunduz.org>

* 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