Unix Technical Forum

VACCUM VERBOSE ANALYZE

This is a discussion on VACCUM VERBOSE ANALYZE within the pgsql Novice forums, part of the PostgreSQL category; --> Hello, I would like to save in a file log from a "VACUUM VERBOSE analyze" perform from psql. I ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Novice

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 10:52 PM
=?ISO-8859-1?Q?C=E9dric_BUSCHINI?=
 
Posts: n/a
Default VACCUM VERBOSE ANALYZE

Hello,

I would like to save in a file log from a "VACUUM VERBOSE analyze"
perform from psql.
I ve tried different ways :
--------------
[USER@DBsrv] # psql -c'VACUUM VERBOSE analyze' > /home/log_vaccum
--------------
the same command in a script without the '> /home/log_vaccum'
[USER@DBsrv] # vaccum.sh > /home/log_vaccum
--------------
[USER@DBsrv]# psql
Welcome to psql 8.0.3, the PostgreSQL interactive terminal.

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

DBsrv=# VACUUM VERBOSE analyze; \o /home/log_vaccum
--------------

...... but no one worked

The log file is created but empty.

Does any one got an idea ?

Cheers

Cedric

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 10:52 PM
Tom Lane
 
Posts: n/a
Default Re: VACCUM VERBOSE ANALYZE

=?ISO-8859-1?Q?C=E9dric_BUSCHINI?= <cbuschini@carax.com> writes:
> I would like to save in a file log from a "VACUUM VERBOSE analyze"
> perform from psql.
> I ve tried different ways :
> --------------
> [USER@DBsrv] # psql -c'VACUUM VERBOSE analyze' > /home/log_vaccum
> --------------


I think that output goes to stderr not stdout. Try

psql -c'VACUUM VERBOSE analyze' 2> /home/log_vaccum

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 10:52 PM
=?ISO-8859-1?Q?C=E9dric_BUSCHINI?=
 
Posts: n/a
Default Re: VACCUM VERBOSE ANALYZE

Thank you Tom. It works !!

Regards,

Cedric

Tom Lane a écrit :

>=?ISO-8859-1?Q?C=E9dric_BUSCHINI?= <cbuschini@carax.com> writes:
>
>
>>I would like to save in a file log from a "VACUUM VERBOSE analyze"
>>perform from psql.
>>I ve tried different ways :
>>--------------
>>[USER@DBsrv] # psql -c'VACUUM VERBOSE analyze' > /home/log_vaccum
>>--------------
>>
>>

>
>I think that output goes to stderr not stdout. Try
>
>psql -c'VACUUM VERBOSE analyze' 2> /home/log_vaccum
>
> regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
>
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:19 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com