pg_dump --no-tablespaces Patch

Posted on August 31, 2007

Recently I submitted a patch to PostgreSQL that will allow pg_dump and pg_dumpall to ignore tablespace data. This is useful if you use tablespaces on one machine and want to restore to another with a different tablespace setup. Since this patch won't likely make it into PostgreSQL until 8.4, I thought I would make it available here for those that could use it.

This should commit cleanly to 8.2.4, and I'll try to keep the patch up to date through 8.3. As of right now, I believe I am the only one who has tested it, so keep that in mind. That being said, I'd use it in production. If you find it useful, please let me know, and likewise if you find any issues with it.

pg_dump-8.2.4-no-tablespace-option.patch.txt