data\pg_log

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

data\pg_log

Postby merkur33 » Mon Mar 23, 2009 6:32 am

my pg_log folder is 2.2 GB big. It contains, what doesn't come unexpected, old logs. Can I delete them? And is it really necessary to create all these logs? Apart from the waste of space, i imagine it slows it down a bit... Can I switch the logging off?
merkur33
 
Posts: 126
Joined: Tue Nov 25, 2008 11:57 am

Re: data\pg_log

Postby WhiteRider » Mon Mar 23, 2009 10:33 am

Yes, you can delete the files in the pg_log folder - but ONLY those. Do NOT delete the other log folders, they are needed by postgres.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: data\pg_log

Postby merkur33 » Mon Mar 23, 2009 11:34 am

thanks, thats what i thought. Do you have any idea concerning the logging and if i can turn it off?
merkur33
 
Posts: 126
Joined: Tue Nov 25, 2008 11:57 am

Re: data\pg_log

Postby WhiteRider » Mon Mar 23, 2009 11:50 am

I wouldn't suggest turning it off, but there are some file-rotation options you could enable to stop so many files being created.

Start -> Programs -> Postgres -> Configuration Files -> Edit postgresql.conf

Look for the section:
#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------

You will see some options commented out (with a # at the start of the line) and brief explanations.
You could try enabling the log_rotation_age option for instance - if you set it to 2 days then you shouldn't lose anything important - if you have a problem you will still be able to access the logs.

Note that after you do this you will need to use the Postgres -> Reload Configurations option for it to take effect.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 2 guests