Re: Get a list of ALL tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kevin Kempter wrote:
Sorry, I meant to send this to the list:


We have a handful of tables that are quite large and take several hours to vacuum. We're managing these large tables by using cron via a schedule that accounts for system load. I want to pull the list of all tables and exclude these large tables from the list, then run the vacuum on the remaining tables once a week to avoid transaction ID wraparound failures.

If I were you, I would use autovacuum for all tables *except* the high velocity tables. That will take care of the wrap concerns and will also allow you to be aggressive via cron on the tables that autovacuum isn't good enough for.

Oh... and get up to 8.1.10

Joshua D. Drake



/Kevin




Kevin Kempter <kevin@xxxxxxxxxxxxxxxxxxx> writes:
I'm working with a client with several highly active 8.1.4 servers. I
want to run a weekly cron that will vacuum ALL db tables except those
with entries in pg_autovacuum (where we've setup manual/cron vacuums) in
order to eliminate transaction ID wraparound failure warnings (which
comes up fairly often).

My question is:
will a select from pg_tables for each database in the cluster provide me
with a full table listing for the purposes of ensuring that all tables in
the db have been vacuumed or are there others I'll need to account for as
well ?
Why are you insisting on inventing your own wheel for this, when
"vacuum" without a parameter does that just fine?

                      regards, tom lane




On Monday 19 November 2007 16:29:15 you wrote:
Kevin Kempter <kevin@xxxxxxxxxxxxxxxxxxx> writes:
I'm working with a client with several highly active 8.1.4 servers. I
want to run a weekly cron that will vacuum ALL db tables except those
with entries in pg_autovacuum (where we've setup manual/cron vacuums) in
order to eliminate transaction ID wraparound failure warnings (which
comes up fairly often).

My question is:
will a select from pg_tables for each database in the cluster provide me
with a full table listing for the purposes of ensuring that all tables in
the db have been vacuumed or are there others I'll need to account for as
well ?
Why are you insisting on inventing your own wheel for this, when
"vacuum" without a parameter does that just fine?

			regards, tom lane



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux