Обсуждение: Postgres Logging doesnt work

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

Postgres Logging doesnt work

От
Pallav Kalva
Дата:
Hi ,

    My production database stopped writting to the postgres log files
all of a sudden, does anybody know why ?

   Database seems to run fine.

    Postgres version is 8.0.2

   Here are my settings

 log_connections                | off
 log_destination                | stderr
 log_directory                  | /var/lib/pgsql/pg_log
 log_disconnections             | off
 log_duration                   | off
 log_error_verbosity            | default
 log_executor_stats             | off
 log_filename                   | postgresql-%U.log
 log_hostname                   | off
 log_line_prefix                | %t%%%r%%%u%%%d
 log_min_duration_statement     | 30000
 log_min_error_statement        | panic
 log_min_messages               | notice
 log_parser_stats               | off
 log_planner_stats              | off
 log_rotation_age               | 10080
 log_rotation_size              | 0
 log_statement                  | ddl
 log_statement_stats            | off
 log_truncate_on_rotation       | on
 syslog_facility                | LOCAL0
 syslog_ident                   | postgres


Thanks!
Pallav.

Re: Postgres Logging doesnt work

От
Andrew Sullivan
Дата:
On Mon, Oct 02, 2006 at 11:04:11AM -0400, Pallav Kalva wrote:
> Hi ,
>
>     My production database stopped writting to the postgres log files
> all of a sudden, does anybody know why ?

How big is the file?

>  log_rotation_age               | 10080
>  log_rotation_size              | 0

You've set this up to rotate once every 10,080 minutes, no matter
what.  If you've run into a file size limit, then you'll be out of
luck until the next file is opened, which should be on the same day
of the week the postmaster was last started.  Just a guess.

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
"The year's penultimate month" is not in truth a good way of saying
November.
        --H.W. Fowler

Re: Postgres Logging doesnt work

От
Pallav Kalva
Дата:
Hi Andrew,

     Thanks! for the reply, it is a small file. the file size on it is
735K that's pretty small. Not sure why it stopped writing to the log
file, is there any way to start logging without starting postgres ?

Pallav.

Andrew Sullivan wrote:
> On Mon, Oct 02, 2006 at 11:04:11AM -0400, Pallav Kalva wrote:
>
>> Hi ,
>>
>>     My production database stopped writting to the postgres log files
>> all of a sudden, does anybody know why ?
>>
>
> How big is the file?
>
>
>>  log_rotation_age               | 10080
>>  log_rotation_size              | 0
>>
>
> You've set this up to rotate once every 10,080 minutes, no matter
> what.  If you've run into a file size limit, then you'll be out of
> luck until the next file is opened, which should be on the same day
> of the week the postmaster was last started.  Just a guess.
>
> A
>
>


Re: Postgres Logging doesnt work

От
"Shoaib Mir"
Дата:
I guess that might work:

1. Set the following in postgresql.conf file --> log_rotation_age = 1
2. rename the already present log file from dbserver logs folder
3. Now do --> pg_ctl reload (so that log_rotation_age change you did comes in affect)
4. Check the log folder after a while (after 1 minutes) and it will be having a new log file and doing all the logging there
5. After it starts the logging you can revert the change done to rotation_age and do a reload again.

Thanks,
---
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)



On 10/2/06, Pallav Kalva <pkalva@livedatagroup.com> wrote:
Hi Andrew,

     Thanks! for the reply, it is a small file. the file size on it is
735K that's pretty small. Not sure why it stopped writing to the log
file, is there any way to start logging without starting postgres ?

Pallav.

Andrew Sullivan wrote:
> On Mon, Oct 02, 2006 at 11:04:11AM -0400, Pallav Kalva wrote:
>
>> Hi ,
>>
>>     My production database stopped writting to the postgres log files
>> all of a sudden, does anybody know why ?
>>
>
> How big is the file?
>
>
>>  log_rotation_age               | 10080
>>  log_rotation_size              | 0
>>
>
> You've set this up to rotate once every 10,080 minutes, no matter
> what.  If you've run into a file size limit, then you'll be out of
> luck until the next file is opened, which should be on the same day
> of the week the postmaster was last started.  Just a guess.
>
> A
>
>


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Re: Postgres Logging doesnt work

От
Pallav Kalva
Дата:
Thanks! Shoaib,  that worked real good. Not sure why it stopped in the
first place.

Shoaib Mir wrote:
> I guess that might work:
>
> 1. Set the following in postgresql.conf file --> log_rotation_age = 1
> 2. rename the already present log file from dbserver logs folder
> 3. Now do --> pg_ctl reload (so that log_rotation_age change you did
> comes in affect)
> 4. Check the log folder after a while (after 1 minutes) and it will be
> having a new log file and doing all the logging there
> 5. After it starts the logging you can revert the change done to
> rotation_age and do a reload again.
>
> Thanks,
> ---
> Shoaib Mir
> EnterpriseDB (www.enterprisedb.com <http://www.enterprisedb.com>)
>
>
>
> On 10/2/06, *Pallav Kalva * <pkalva@livedatagroup.com
> <mailto:pkalva@livedatagroup.com>> wrote:
>
>     Hi Andrew,
>
>          Thanks! for the reply, it is a small file. the file size on it is
>     735K that's pretty small. Not sure why it stopped writing to the log
>     file, is there any way to start logging without starting postgres ?
>
>     Pallav.
>
>     Andrew Sullivan wrote:
>     > On Mon, Oct 02, 2006 at 11:04:11AM -0400, Pallav Kalva wrote:
>     >
>     >> Hi ,
>     >>
>     >>     My production database stopped writting to the postgres log
>     files
>     >> all of a sudden, does anybody know why ?
>     >>
>     >
>     > How big is the file?
>     >
>     >
>     >>  log_rotation_age               | 10080
>     >>  log_rotation_size              | 0
>     >>
>     >
>     > You've set this up to rotate once every 10,080 minutes, no matter
>     > what.  If you've run into a file size limit, then you'll be out of
>     > luck until the next file is opened, which should be on the same day
>     > of the week the postmaster was last started.  Just a guess.
>     >
>     > A
>     >
>     >
>
>
>     ---------------------------(end of
>     broadcast)---------------------------
>     TIP 9: In versions below 8.0, the planner will ignore your desire to
>            choose an index scan if your joining column's datatypes do not
>            match
>
>