I''m thinking that it would be very attractive to have some methods in place that would do things like pg_dump on a per table basis and do things like vacuum but I would want standard out directed to the screen so I could see the effects. I haven''t found any plugins that do things like that - does anyone have any direction/suggestions? Craig --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, 2007-03-08 at 19:16 -0700, Craig White wrote:> I''m thinking that it would be very attractive to have some methods in > place that would do things like pg_dump on a per table basis and do > things like vacuum but I would want standard out directed to the screen > so I could see the effects. > > I haven''t found any plugins that do things like that - does anyone have > any direction/suggestions?---- no one? Am I the first to consider this or is this not ruby material? Craig --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Friday 09 March 2007, Craig White wrote:> I''m thinking that it would be very attractive to have some methods in > place that would do things like pg_dump on a per table basis and do > things like vacuum but I would want standard out directed to the > screen so I could see the effects. > > I haven''t found any plugins that do things like that - does anyone > have any direction/suggestions?Well, why would you need it? I''m using PostgreSQL myself and I don''t have a use for this functionality. What''s the purpose of dumping a single table? For backups, I dump the entire database. For export, I use CSV or XML. I''m not saying that you''re trying to do something wrong, but simply that I don''t understand what it is you want to achieve. Regarding vacuum(ing), I think this is not a task that Rails should care about. This is a task that your PostgreSQL installation should handle with the help of cron jobs. As a matter of fact, that''s just how it works on Debian. Below is an excerpt from /etc/cron.d/postgresql-common. Michael # Run VACUUM ANALYSE on all databases every 5 hours if pg_autovacuum is not # running 2 0,5,10,15,20 * * 1-6 root if [ -x /usr/sbin/pg_maintenance ]; then /usr/sbin/pg_maintenan ce --analyze >/dev/null; fi # On Sunday you may wish to run a VACUUM FULL ANALYSE as well # If you do not run a 24/7 site, you may want to uncomment the next line # so as to do a regular VACUUM FULL. If you need 24/7 connectivity, save # VACUUM FULL for when you think you really need it. 10 3 * * Sun root if [ -x /usr/sbin/pg_maintenance ]; then /usr/sbin/pg_maintenance --full --analyze >/dev/null; fi -- Michael Schuerig mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org http://www.schuerig.de/michael/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 3/10/07, Michael Schuerig <michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org> wrote:> Regarding vacuum(ing), I think this is not a task that Rails should care > about. This is a task that your PostgreSQL installation should handlePlus, PostgreSQL 8.x autovacuums. jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Sat, 2007-03-10 at 01:57 -0800, Jeremy Kemper wrote:> On 3/10/07, Michael Schuerig <michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org> wrote: > > Regarding vacuum(ing), I think this is not a task that Rails should care > > about. This is a task that your PostgreSQL installation should handle > > Plus, PostgreSQL 8.x autovacuums.---- I know, but I''m using CentOS 4.4 and it is still PostgreSQL 7.4.x Craig --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Sat, 2007-03-10 at 10:24 +0100, Michael Schuerig wrote:> On Friday 09 March 2007, Craig White wrote: > > I''m thinking that it would be very attractive to have some methods in > > place that would do things like pg_dump on a per table basis and do > > things like vacuum but I would want standard out directed to the > > screen so I could see the effects. > > > > I haven''t found any plugins that do things like that - does anyone > > have any direction/suggestions? > > Well, why would you need it? I''m using PostgreSQL myself and I don''t > have a use for this functionality. What''s the purpose of dumping a > single table? For backups, I dump the entire database. For export, I > use CSV or XML. I''m not saying that you''re trying to do something > wrong, but simply that I don''t understand what it is you want to > achieve.---- I do a full dump every night but I''m thinking that it would be nice to have a table by table backup on demand because even though I try to thoroughly test every thing before I migrate code into production, I do have occasions where I have to tweak production code and I was thinking that these types of on demand backups would be nice without having to fire up something else (like pgadmin or phppgadmin). I have already created a mini-controller for utilities to do things like expire cached pages and was simply thinking of adding some postgresql functionality. ----> > Regarding vacuum(ing), I think this is not a task that Rails should care > about. This is a task that your PostgreSQL installation should handle > with the help of cron jobs. As a matter of fact, that''s just how it > works on Debian. Below is an excerpt > from /etc/cron.d/postgresql-common. > > Michael > > > # Run VACUUM ANALYSE on all databases every 5 hours if pg_autovacuum is > not > # running > 2 0,5,10,15,20 * * 1-6 root if [ -x /usr/sbin/pg_maintenance ]; > then /usr/sbin/pg_maintenan > ce --analyze >/dev/null; fi > > # On Sunday you may wish to run a VACUUM FULL ANALYSE as well > # If you do not run a 24/7 site, you may want to uncomment the next line > # so as to do a regular VACUUM FULL. If you need 24/7 connectivity, > save > # VACUUM FULL for when you think you really need it. > 10 3 * * Sun root if [ -x /usr/sbin/pg_maintenance ]; > then /usr/sbin/pg_maintenance --full > --analyze >/dev/null; fi---- thanks Craig --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 10, 2007, at 8:27 AM, Craig White wrote:>> Plus, PostgreSQL 8.x autovacuums. > ---- > I know, but I''m using CentOS 4.4 and it is still PostgreSQL 7.4.xupgrade. Postgres 8.x is much faster. -pete -- (peter.royal|osi)@pobox.com - http://fotap.org/~osi
tommins-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-11 00:22 UTC
Re: postgresql utilities
Jumping on the "upgrade to PostgreSQL 8" bandwagon: $ pg_dump --help |grep table -t, --table=TABLE dump the named table only $ pg_dump --version pg_dump (PostgreSQL) 8.1.8 -molecule On Mar 10, 1:11 pm, peter royal <peter.ro...-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org> wrote:> On Mar 10, 2007, at 8:27 AM, Craig White wrote: > > >> Plus, PostgreSQL 8.x autovacuums. > > ---- > > I know, but I''m using CentOS 4.4 and it is still PostgreSQL 7.4.x > > upgrade. Postgres 8.x is much faster. > > -pete > > -- > (peter.royal|osi)@pobox.com -http://fotap.org/~osi > > smime.p7s > 3KDownload--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
tommins-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-11 00:28 UTC
Re: postgresql utilities
Also, there''s a plugin that does this on a per-Model, db-agnostic basis in Rails: Dump or Slurp YAML Reference Data (and Fixtures) http://nubyonrails.com/articles/2005/12/27/dump-or-slurp-yaml-reference-data It''s very handy for dumping and loading data in Rails. It plugs into Rake now via "rake db:data:dump" and "rake db:data:load". cheers, On Mar 10, 7:22 pm, "tomm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <tomm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Jumping on the "upgrade to PostgreSQL 8" bandwagon: > > $ pg_dump --help |grep table > -t, --table=TABLE dump the named table only > $ pg_dump --version > pg_dump (PostgreSQL) 8.1.8 > > -molecule > > On Mar 10, 1:11 pm, peter royal <peter.ro...-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org> wrote: > > > On Mar 10, 2007, at 8:27 AM, Craig White wrote: > > > >> Plus, PostgreSQL 8.x autovacuums. > > > ---- > > > I know, but I''m using CentOS 4.4 and it is still PostgreSQL 7.4.x > > > upgrade. Postgres 8.x is much faster. > > > -pete > > > -- > > (peter.royal|osi)@pobox.com -http://fotap.org/~osi > > > smime.p7s > > 3KDownload--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Sat, 2007-03-10 at 16:28 -0800, tommins-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Also, there''s a plugin that does this on a per-Model, db-agnostic > basis in Rails: > > Dump or Slurp YAML Reference Data (and Fixtures) > http://nubyonrails.com/articles/2005/12/27/dump-or-slurp-yaml-reference-data > > It''s very handy for dumping and loading data in Rails. It plugs into > Rake now via "rake db:data:dump" and "rake db:data:load".---- that might be good enough for my purposes...thanks Craig --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---