How to do indexing, partition, and migration in Postgres 10

From DISI
Revision as of 20:19, 3 August 2018 by Jizhou (talk | contribs) (Created page with "This tutorial shows how to do data migration, partition, and indexing in Postgres 10. ''1. Migrate data directory'' The dataset is quite large, and it will take up about 220...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This tutorial shows how to do data migration, partition, and indexing in Postgres 10.

1. Migrate data directory

The dataset is quite large, and it will take up about 220GB of hard disk once loaded and indexed into Postgres. It is better to move the database storage to another large disk instead of the default (root) one. A Solid State Disk (SSD) is preferred for faster disk access.

(1) Check current Postgres data directory.

# log into Postgres

sudo -i 
su - postgres
psql
SHOW data_directory;