<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">Right.<br><br>As you supposed to know, IMO make a first<br><br>pg_restore -l yourbackup.dump > yourbackup.toc<br><br>then as you suggested, try to find the 'word' to exclude using grep.<br><br>--exclude-schema was specially done to exclude Slony schema. For example, if there is a "vacuum process" on Slony's tables <br>while pg_dump is running, you may suffer from deadlock.<br><br><br><div><br></div> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight:bold;">De :</span></b> Stuart Bishop <stuart@stuartbishop.net><br> <b><span style="font-weight: bold;">À :</span></b> David TECHER <davidtecher@yahoo.fr> <br><b><span
style="font-weight: bold;">Cc :</span></b> slony <slony1-general@lists.slony.info> <br> <b><span style="font-weight: bold;">Envoyé le :</span></b> Mercredi 30 Novembre 2011 8h55<br> <b><span style="font-weight: bold;">Objet :</span></b> Re: Re : [Slony1-general] Re : dump, restore & --exclude-schema<br> </font> <br>On Tue, Nov 29, 2011 at 8:28 PM, David TECHER <<a ymailto="mailto:davidtecher@yahoo.fr" href="mailto:davidtecher@yahoo.fr">davidtecher@yahoo.fr</a>> wrote:<br>> I did a little mistake<br>><br>> pg_dump -N _ the_name_of_clustername -Fc -f yourdump.dmp -h... -p... -U....<br>> ....<br>><br>> First generate the TOC using -l<br>><br>> pg_restore -l yourdump.dmp | grep -v the_name_of_clustername > toc.safe<br>><br>> Then restore using the new toc and -L<br>><br>> pg_restore -L toc.safe yourdump.dmp<br><br><br>Thanks.<br><br>This looks rather fragile (I'll need to modify it to catch
false<br>positives with that grep for starters - curses for picking a simple<br>clustername). Unfortunately I might have to run with it as I noticed<br>from my commit logs that the other reason for using --exclude-schema<br>was to avoid the read lock that causes reported database lag to bloat<br>when doing backups (setting off nagios alerts and waking people up).<br><br>Or maybe I should just exclude certain tables to avoid the locking issue?<br><br>-- <br>Stuart Bishop <<a ymailto="mailto:stuart@stuartbishop.net" href="mailto:stuart@stuartbishop.net">stuart@stuartbishop.net</a>><br><a href="http://www.stuartbishop.net/" target="_blank">http://www.stuartbishop.net/</a><br><br><br> </div> </div> </div></body></html>