-
Notifications
You must be signed in to change notification settings - Fork 37
Moving tables to new tablespace
adamhooper edited this page Nov 25, 2014
·
6 revisions
[Adam, 2014-11-25]
- Save space on the "old" database volume
- Zero downtime
- The "old" database volume is filled mostly by file contents, which we'll be removing as we do this migration
- Staging will be up the entire time
- Create a new volume on EC2 and mount it
- Make Postgres aware of the new volume
- Use
pg_repack
to move tables from the old volume to the new one.
Ran all these steps on staging/database first, then on production/database.