Postgresql – open/execute huge sql file

postgresql

I have SQL file using PostgreSQL with size about 7GB. How can I open/execute the SQL file? I have researched and tried using Navicat Premium, Razor SQL, HeidiSQL, Workbench. In all I get out of memory. I know for sure it is a PostgreSQL database dump.

Best Answer

PostgreSQL database dumps are normally produced by the command line tool pg_dump, and expected to be used via either pg_restore or simply psql command line tools.

However, you can both backup and restore from PgAdminIII. The backup option is available via right-clicking either the server or any database or schema. The Restore option is available via right-clicking a database or schema.

Here's a step-by-step example of how dump or restore a database using PgAdmin.