Обсуждение: How to check if VACUUM operations are working?

Поиск
Список
Период
Сортировка

How to check if VACUUM operations are working?

От
Miguel Arroz
Дата:
Hi!

   I have PgSQL 8.0.* installed on a Mac OS X Server machine.

   I setup a LaunchDeamon to run a vacuum command every night. The
problem is that LaunchDeamon still lacks some features, one of them
is logging... so, I'm not entirely sure if the vacuum operations
actually runs.

   Is there any way to "ask" the database about it's status, related
to vacuum, like when was it vacuumed last time, or some other info
that may assure the script is running fine.

   Yours

Miguel Arroz

       "GUERRA E' PAZ
        LIBERDADE E' ESCRAVIDAO
        IGNORANCIA E' FORCA"       -- 1984

Miguel Arroz
http://www.ipragma.com




Re: How to check if VACUUM operations are working?

От
Niklas Johansson
Дата:
On 6 sep 2006, at 01.07, Miguel Arroz wrote:
> I have PgSQL 8.0.* installed on a Mac OS X Server machine.
>
> I setup a LaunchDeamon to run a vacuum command every night. The
> problem is that LaunchDeamon still lacks some features, one of them
> is logging... so, I'm not entirely sure if the vacuum operations
> actually runs.

You can add the key 'StandardOutPath' to your launchd.plist file:

<key>StandardOutPath</key>
<string>/path/to/logfile</string>

You can also supply 'StandardErrorPath'.

This of course only works for commands that writes information to
stdout (or stderr). If not, or if the output is not directly suitable
for logging, it might be necessary to wrap the command in a script in
order to generate additional logging information, e.g. timestamp.


Sincerely,

Niklas Johansson