vacuum schema

Started by Josh Closeover 21 years ago6 messagesgeneral
Jump to latest
#1Josh Close
narshe@gmail.com

Is there a way to vacuum all tables in a schema? Or will I need to
write a script to do it?

-Josh

#2Thomas F.O'Connell
tfo@sitening.com
In reply to: Josh Close (#1)
Re: vacuum schema

Are you looking for something different than vacuumdb?

http://www.postgresql.org/docs/7.4/static/app-vacuumdb.html

-tfo

On Oct 18, 2004, at 3:23 PM, Josh Close wrote:

Show quoted text

Is there a way to vacuum all tables in a schema? Or will I need to
write a script to do it?

-Josh

---------------------------(end of
broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

#3Josh Close
narshe@gmail.com
In reply to: Thomas F.O'Connell (#2)
Re: vacuum schema

On Mon, 18 Oct 2004 15:35:53 -0500, Thomas F. O'Connell
<tfo@sitening.com> wrote:

Are you looking for something different than vacuumdb?

http://www.postgresql.org/docs/7.4/static/app-vacuumdb.html

-tfo

I think so. As far as I can tell, you can either vacuum a whole db, or
individual tables. But not a whole schema.

-Josh

#4Thomas F.O'Connell
tfo@sitening.com
In reply to: Josh Close (#3)
Re: vacuum schema

Ah, yes. You're right.

Presumably you could use the hidden query from \dn in psql to get the
tables necessary for a script. That's the next best thing I can think
of.

-tfo

On Oct 18, 2004, at 6:02 PM, Josh Close wrote:

Show quoted text

On Mon, 18 Oct 2004 15:35:53 -0500, Thomas F. O'Connell
<tfo@sitening.com> wrote:

Are you looking for something different than vacuumdb?

http://www.postgresql.org/docs/7.4/static/app-vacuumdb.html

-tfo

I think so. As far as I can tell, you can either vacuum a whole db, or
individual tables. But not a whole schema.

-Josh

---------------------------(end of
broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

#5Josh Close
narshe@gmail.com
In reply to: Thomas F.O'Connell (#4)
Re: vacuum schema

On Tue, 19 Oct 2004 00:48:34 -0500, Thomas F. O'Connell
<tfo@sitening.com> wrote:

Ah, yes. You're right.

Presumably you could use the hidden query from \dn in psql to get the
tables necessary for a script. That's the next best thing I can think
of.

I wrote a script to do the vacumming. I just have a config file where
you can list the tables you want vacuumed.

Can you use those tables via normal sql? It would be nice to do that via sql.

-Josh

#6Thomas F.O'Connell
tfo@sitening.com
In reply to: Josh Close (#5)
Re: vacuum schema

Sure. The system tables can be accessed via SQL.

I frequently use the output of psql's hidden queries to glean more
information about postgres internals for needs like yours where
postgres has the information but not the interface to accomplish a
specific task.

-tfo

On Oct 19, 2004, at 12:50 PM, Josh Close wrote:

Show quoted text

On Tue, 19 Oct 2004 00:48:34 -0500, Thomas F. O'Connell
<tfo@sitening.com> wrote:

Ah, yes. You're right.

Presumably you could use the hidden query from \dn in psql to get the
tables necessary for a script. That's the next best thing I can think
of.

I wrote a script to do the vacumming. I just have a config file where
you can list the tables you want vacuumed.

Can you use those tables via normal sql? It would be nice to do that
via sql.

-Josh