Stuart Bishop stuart at stuartbishop.net
Tue Nov 29 23:55:16 PST 2011
On Tue, Nov 29, 2011 at 8:28 PM, David TECHER <davidtecher at yahoo.fr> wrote:
> I did a little mistake
>
> pg_dump -N _ the_name_of_clustername -Fc -f yourdump.dmp -h... -p... -U....
> ....
>
> First generate the TOC using -l
>
> pg_restore -l yourdump.dmp | grep -v the_name_of_clustername > toc.safe
>
> Then restore using the new toc and -L
>
> pg_restore -L toc.safe yourdump.dmp


Thanks.

This looks rather fragile (I'll need to modify it to catch false
positives with that grep for starters - curses for picking a simple
clustername). Unfortunately I might have to run with it as I noticed
from my commit logs that the other reason for using --exclude-schema
was to avoid the read lock that causes reported database lag to bloat
when doing backups (setting off nagios alerts and waking people up).

Or maybe I should just exclude certain tables to avoid the locking issue?

-- 
Stuart Bishop <stuart at stuartbishop.net>
http://www.stuartbishop.net/


More information about the Slony1-general mailing list