Re: Allowing multi "-t" and adding "-n" to vacuumdb ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jehan-Guillaume (ioguix) de Rorthais" <jgdr(at)dalibo(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allowing multi "-t" and adding "-n" to vacuumdb ?
Date: 2012-03-01 22:13:35
Message-ID: 18752.1330640015@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jehan-Guillaume (ioguix) de Rorthais" <jgdr(at)dalibo(dot)com> writes:
> One of our customer send us a patch he wrote for his needs (on
> "src/bin/scripts/vacuumdb.c", no doc were included).

> He's using one schema per application and would like to be able to run
> vacuumdb on each of them independently so he added the "--schema|-n"
> option and send us the patch.

> Reviewing his patch, I thought it would be more useful to allow multi
> "--table|-t" options on the command line first. It might be possible to
> pass an array of tables to "vacuum_one_database" function instead of
> just one.

> Then, we could add the "--schema|-n" option which would fetch and build
> the table list and call "vacuum_one_database".

> But before I start writing this patch, I would like some opinion, pros /
> cons. Do you think such a feature could be accepted in official
> PostgreSQL code or should we keep this as an external script ?

I think most of us see vacuumdb as a historical leftover. We keep it
around in case anyone is still relying on it, but improving it seems
like misdirected effort.

Why isn't your customer using autovacuum? If there are concrete
reasons why that doesn't get the job done for him, it would be more
useful in the long run to work on fixing that.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Boley 2012-03-01 22:16:53 Re: Collect frequency statistics for arrays
Previous Message Alvaro Herrera 2012-03-01 22:12:39 Re: Collect frequency statistics for arrays