Dumping a database which contains a table with a bytea column takes approximately 25 hours and 45 minutes. The database has 26 tables in it. The other 25 tables take less than 5 minutes to dump so almost all time is spent dumping the bytea table.
I also perform a hot backup of this database using pg_start_backup(), tar, and pg_stop_backup(). It takes only 20 minutes to create a tar ball of the entire 62GB. I like the speed of this method, but it does not allow me to restore 1 table at a time.
The version of postgres is PostgreSQL 8.0.0 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2
The machine has 4 Xeon 3.00 GHz processors with hyper-threading on and 4GB of memory. Postgres is supported by two file systems connected to an EMC SAN disk array. One 2 GB one for the log files and a second 500 GB one for the data and indexes. All output files for the backup files are placed onto the 500 GB volume group and then backed up to an external storage manager.
Portions of the config file are:
shared_buffers = 16384
work_mem = 8192
maintenance_work_mem = 16384
max_fsm_pages = 512000
max_fsm_relations = 1000
fsync = true
# - Checkpoints -
checkpoint_segments = 20
# - Planner Cost Constants -
effective_cache_size = 262144
random_page_cost = 3
I am looking for ideas for making the backup of the above table much faster.