Name some security features
Name some recovery and availability features
Name some cool advanced features
What does MVCC stand for
Multi-Version Concurrency Control
List some characteristics of MVCC
What does WAL stand for?
Write-Ahead Logs (or Write-Ahead Logging)
How does WAL work?
What is ACID?
Atomicity, Consistency, Isolation, Durability
List some commonly used pg_dump switches
Name four general methods for backup
List two methods (command line examples) for dealing with very large databases when doing SQL backups
* pg_dump … | split -b 1m - filename
Describe two methods for restoring SQL dumps done with pg_dump
Using command defaults for pg_dump, when you restore a backup into a new cluster, is there anything you need to do first?
Yes, create the target database. By default, pg_dump does not include the command to create the target database.
What does the –create (-C) switch to pg_dump do?
pg_dump --create inserts a command to create and reconnect to the target database before the commands to populate that database.
What does the –clean switch to pg_dump do?
pg_dump --clean drops the target database prior to recreating it, when using the –create (-C) switch.
List important pg_restore options
pg_restore
What command can dump an entire cluster as SQL?
pg_dumpall
What does pg_dumpall do?
pg_dumpall dumps all databases in the cluster, and also global objects such as roles and tablespaces.
List commonly used pg_dumpall switches
pg_dumpall
How many times does pg_dumpall ask for authentication credentials?
Once per database (and more?)
Why is it a good idea to use a pgpass file when using pg_dumpall?
A pgpass file is a good idea for pg_dumpall because the user’s credentials are requested once per database in the cluster.
List some characteristics of SQL dumps as a backup mechanism
Next to SQL dump, what is the next most simple backup approach?
Simple file system level backup is an alternative to SQL dumps, provided that either 1) the database is shut down during the backup, or 2) the native snapshot feature of the filesystem is used (if available).
Why mightn’t filesystem snapshots work without database downtime, even if your filesystem supports this feature?
Filesystem snapshots might not work if the database is spread across multiple filesystems; if not, you would have to stop the database to take the multiple snapshots.
- format: plain or tar - X - include log files created during the backup, so the backup is fully usable - z - compress with gzip - Z - compression level - P - enable progress reporting - h - host on which cluster is running - p - cluster port