PaGoDump is a GUI Windows utility for backing up a PostgreSQL database built with Microolap PostgresDAC. It makes consistent backups even if the database is being used concurrently. PaGoDump does not block other users accessing the database (readers or writers), also it works with databases with any names (unicode) and dump them to any files (unicode again).
Dumps can be output in script or archive file formats. Script dumps are plain-text files containing the SQL commands required to reconstruct the database to the state it was in at the time it was saved. To restore from such a script, feed it to psql. Script files can be used to reconstruct the database even on other machines and other architectures; with some modifications even on other SQL database products.
The alternative archive file formats must be used with pg_restore to rebuild the database. They allow pg_restore to be selective about what is restored, or even to reorder the items prior to being restored. The archive file formats are designed to be portable across architectures.
When used with one of the archive file formats and combined with pg_restore, PaGoDump provides a flexible archival and transfer mechanism. PaGoDump can be used to backup an entire database, then pg_restore can be used to examine the archive and/or select which parts of the database are to be restored. The most flexible output file format is the "COMPRESS" format. It allows for selection and reordering of all archived items, and is compressed by default. The TAR format is not compressed and it is not possible to reorder data when loading, but it is otherwise quite flexible; moreover, it can be manipulated with standard Unix tools such as tar.
While running PaGoDump, one should examine the output for any warnings (Log tab), especially in light of the limitations listed below.
Profile File Name - enter here existing profile file name to open previously saved options or new name to have Save functionality enabled.
Recently Used Profiles - Double-click to open one of recently used profiles.
Host - specifies the host name of the machine on which the server is running.
Username - user name to connect as.
Password - specifies a password for the connection.
Port - specifies the TCP port on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.
Connection Timeout - specifies amount of time to attempt a connection in seconds.
Database Name - specifies the name of the database to be dumped.
Output Format - selects the format of the output. Can be one of the following:
Output File Name - send output to the specified file.
Include BLOBs - include large objects in the dump. This is the default behavior except when Schema Only is specified, so theis option is only useful to add large objects to selective dumps.
With OIDs - dump object identifiers OIDs as part of the data for every table. Use this option if your application references the OID columns in some way (e.g., in a foreign key constraint). Otherwise, this option should not be used.
Disable Dollar ($) Quoting - this option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.
No Priveleges - prevent dumping of access privileges (grant/revoke commands).
Compression Level (0..9) - specify the compression level to use. Zero means no compression. For the custom archive format, this specifies compression of individual table-data segments, and the default is to compress at a moderate level. For plain text output, setting a nonzero compression level causes the entire output file to be compressed, as though it had been fed through gzip. The tar archive format currently does not support compression at all.
Verbose Messages - specifies verbose mode. This will cause PaGoDump to output detailed object comments and start/stop times to the dump file, and progress messages to Log tab.
Ignore Version - ignore version mismatch between PaGoDump and the database server. PaGoDump can dump from servers running previous releases of PostgreSQL, but very old versions are not supported anymore (currently, those prior to 7.0). Dumping from a server newer than PaGoDump is likely not to work at all. Use this option if you need to override the version check (and if PaGoDump then fails, don't say you weren't warned).
Only Data - dump only the data, not the schema (data definitions). This option is only meaningful for the plain-text format. For the archive formats, you can specify the option when you call pg_restore.
Only Schema - dump only the object definitions (schema), not data.
Drop Database - output commands to clean (drop) database objects prior to (the commands for) creating them. This option is only meaningful for the plain-text format. For the archive formats, you can specify the option when you call pg_restore.
Create Database - begin the output with a command to create the database itself and reconnect to the created database. (With a script of this form, it doesn't matter which database you connect to before running the script.) This option is only meaningful for the plain-text format. For the archive formats, you can specify the option when you call pg_restore.
Use INSERT Commands - dump data as INSERT commands (rather than COPY). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non-PostgreSQL databases. Also, since this option generates a separate command for each row, an error in reloading a row causes only that row to be lost rather than the entire table contents. Note that the restore might fail altogether if you have rearranged column order.
Use INSERT Commands With Columns Names - dump data as INSERT commands with explicit column names (INSERT INTO <table>(<column>, ...) VALUES ...). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non-PostgreSQL databases. Also, since this option generates a separate command for each row, an error in reloading a row causes only that row to be lost rather than the entire table contents.
No Owner - do not output commands to set ownership of objects to match the original database. By default, PaGoDump issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created database objects. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, check this option. This option is only meaningful for the plain-text format. For the archive formats, you can specify the option when you call pg_restore.
Disable Triggers - this option is only relevant when creating a data-only dump. It instructs PaGoDump to include commands to temporarily disable triggers on the target tables while the data is reloaded. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data reload. Presently, the commands emitted for this option must be done as superuser. So, you should also specify a superuser name with -S, or preferably be careful to start the resulting script as a superuser.
This option is only meaningful for the plain-text format. For the archive formats, you can specify the option when you call pg_restore.
Superuser Name - specify the superuser user name to use when disabling triggers. This is only relevant if "Disable Triggers" option is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)
Use SET SESSION AUTHORIZATION - output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly. Also, a dump using SET SESSION AUTHORIZATION will certainly require superuser privileges to restore correctly, whereas ALTER OWNER requires lesser privileges.
PaGoDump internally executes SELECT statements. If you have problems running PaGoDump, make sure you are able to select information from the database using, for example, psql.
CREATE DATABASE foo WITH TEMPLATE template0;
PaGoDump has a limitation; when a data-only dump is chosen and the option "Disable Triggers" is used, PaGoDump emits commands to disable triggers on user tables before inserting the data and commands to re-enable them after the data has been inserted. If the restore is stopped in the middle, the system catalogs might be left in the wrong state.
Members of tar archives are limited to a size less than 8 GB. (This is an inherent limitation of the tar file format.) Therefore this format cannot be used if the textual representation of any one table exceeds that size. The total size of a tar archive and any of the other output formats is not limited, except possibly by the operating system.
The dump file produced by PaGoDump does not contain the statistics used by the optimizer to make query planning decisions. Therefore, it is wise to run ANALYZE after restoring from a dump file to ensure good performance. The dump file also does not contain any ALTER DATABASE ... SET commands.
Because PaGoDump is used to transfer data to newer versions of PostgreSQL, the output of PaGoDump can be loaded into newer PostgreSQL databases. It also can read older PostgreSQL databases. However, it usually cannot read newer PostgreSQL databases or produce dump output that can be loaded into older database versions. To do this, manual editing of the dump file might be required.
Disclaimer: for obvious reasons this document is based on the original PostgreSQL pg_dump documentation. Microolap Technologies don't pretend to be the author of the text above.