Laur IVAN

Migrate PostgreSQL Between Two Machines

Posted by in IT, Tutorial

TL;DR: Once you prepare the connection, pg_dump is your friend. Recently, we had to migrate a large-ish DB (1.5 TB) from a Windows installation to a Linux one in order to accommodate a series of third party extensions. We have split the process in three: Prepare the migration Migrate users Migrate the database Wrap up Let’s say we have the two machines: SourceMachine – the machine containing the source DB (the Windows machine in my case) DestinationMachine – the destination machine Note: All PostgreSQL commands are symmetrical in the sense…read more

Postgres: Show Schema Sizes in a Database

Posted by in Software

While loading a large database from files to a Postgres schema, I found very useful to know how much space on disk it actually occupies (just in case I need to re-size the disk). I found this answer online:

Which results in a list like: HTH, PS: All credit goes to this StackOverflow answer! A little experiment: If you find this post and ad below useful, please check the ad out :-)