Re: Enhancement to pg_dump
От | Rob Kirkbride |
---|---|
Тема | Re: Enhancement to pg_dump |
Дата | |
Msg-id | e0b3cb2b0811251305g8cfd28enf68e07fd2a5b53ad@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Enhancement to pg_dump (Gregory Stark <stark@enterprisedb.com>) |
Ответы |
Re: Enhancement to pg_dump
|
Список | pgsql-hackers |
OK thanks for the advice. <br /><br />What I'm trying to overcome is where we've got a long report running and the processthat is taking data from the main database cannot complete because of the drop table. I believe a DELETE (and possiblyTRUNCATE?) doesn't need an exclusive lock on the table and therefore can continue.<br /><br />I've introduced a --delete-not-dropoption which simply does a DELETE FROM % rather than 'DROP and then CREATE'. <br /><br />I hope this soundssensible and I haven't missed something - I'm still learning!<br /><br />Rob<br /><br /><br /><div class="gmail_quote">2008/11/25Gregory Stark <span dir="ltr"><<a href="mailto:stark@enterprisedb.com">stark@enterprisedb.com</a>></span><br/><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">"RobKirkbride" <<a href="mailto:rob.kirkbride@gmail.com">rob.kirkbride@gmail.com</a>> writes:<br /><br/> > Once I'm happy with it (I'm a bit rusty at C!), do I post the patch here?<br /><br /></div>I would say you shouldpost *before* you have a patch you're happy with. As<br /> soon as you have a specific plan of what you want to doit's best to post an<br /> outline of it. That way you at least have a chance of avoiding wasting work in<br /> the wrongdirection.<br /><br /> Sometimes things don't really work out that way -- sometimes the plan sounds<br /> good and itonly becomes apparent there's a better way later -- but you're<br /> best off getting the best chance you can.<br /><br/> Incidentally, I don't know exactly what the use case you're trying to cover<br /> here is but you should considerlooking at TRUNCATE instead of DELETE if<br /> you're really deleting all the records in the table and can acceptlocking the<br /> table.<br /><font color="#888888"><br /> --<br /> Gregory Stark<br /> EnterpriseDB <ahref="http://www.enterprisedb.com" target="_blank">http://www.enterprisedb.com</a><br /> Ask me about EnterpriseDB'sSlony Replication support!<br /></font></blockquote></div><br />
В списке pgsql-hackers по дате отправления: