From: adey <adey11@gmail.com>
To: Kevin Kempter <kevin@kevinkempterllc.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Get a list of ALL tables
Date: Tue, 20 Nov 2007 13:26:23 +1300
Message-ID: <1c66bda80711191626w581ce731wbf862c92d92648cc@mail.gmail.com> (raw)
In-Reply-To: <200711191641.10792.kevin@kevinkempterllc.com>
References: <200711191524.47852.kevin@kevinkempterllc.com>
<8053.1195514955@sss.pgh.pa.us>
<200711191641.10792.kevin@kevinkempterllc.com>
This usually does it for me:-
select *
from
-- information_schema.tables
pg_catalog.pg_tables
--WHERE
-- table_schema = 'public'
--ORDER BY
-- table_name
On 11/20/07, Kevin Kempter <kevin@kevinkempterllc.com> 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.
>
>
> /Kevin
>
>
>
>
> > Kevin Kempter <kevin@kevinkempterllc.com> 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@kevinkempterllc.com> 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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: adey11@gmail.com, kevin@kevinkempterllc.com
Subject: Re: Get a list of ALL tables
In-Reply-To: <1c66bda80711191626w581ce731wbf862c92d92648cc@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox