[prev in list] [next in list] [prev in thread] [next in thread]
List: slony1-general
Subject: [Slony1-general] Re : Re : Re : dump, restore & --exclude-schema
From: David TECHER <davidtecher () yahoo ! fr>
Date: 2011-11-30 10:45:00
Message-ID: 1322649900.68431.YahooMailNeo () web29815 ! mail ! ird ! yahoo ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Right.
As you supposed to know, IMO make a first
pg_restore -l yourbackup.dump > yourbackup.toc
then as you suggested, try to find the 'word' to exclude using grep.
--exclude-schema was specially done to exclude Slony schema. For example, if there is \
a "vacuum process" on Slony's tables while pg_dump is running, you may suffer from \
deadlock.
________________________________
De : Stuart Bishop <stuart@stuartbishop.net>
À : David TECHER <davidtecher@yahoo.fr>
Cc : slony <slony1-general@lists.slony.info>
Envoyé le : Mercredi 30 Novembre 2011 8h55
Objet : Re: Re : [Slony1-general] Re : dump, restore & --exclude-schema
On Tue, Nov 29, 2011 at 8:28 PM, David TECHER <davidtecher@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@stuartbishop.net>
http://www.stuartbishop.net/
[Attachment #5 (text/html)]
<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>
_______________________________________________
Slony1-general mailing list
Slony1-general@lists.slony.info
http://lists.slony.info/mailman/listinfo/slony1-general
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic