Re: vacuum full for all databases

From: Ilia Chipitsine <ilia(at)paramon(dot)ru>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: vacuum full for all databases
Date: 2004-09-02 08:12:41
Message-ID: 20040902141204.M15260@office.paramon.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Ilia Chipitsine wrote:
> > Dear Sirs
> >
> > I'm about to write plpgsql function which will "vacuum full" all existing
> > databases. Below is an example how to get list of databases.
> >
> > What should I write instead of "raise notice" ?
>
> > raise notice ''datname = %'',list.datname;
>
> Something like:
> EXECUTE ''VACUUM FULL '' || list.datname;

"vacuum full" accepts relation name, not database name

$ psql -U pgsql template1
Welcome to psql 7.4.2, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

template1=# vacuum full site_b170;
ERROR: relation "site_b170" does not exist
template1=#

>
> --
> Richard Huxton
> Archonet Ltd
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tony Reina 2004-09-02 08:21:15 Re: can't build libpq with beta 2
Previous Message Richard Huxton 2004-09-02 08:03:41 Re: vacuum full for all databases