Обсуждение: WTF? 9.2.4 Logs have the wrong day of the week?

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

WTF? 9.2.4 Logs have the wrong day of the week?

От
Scott Whitney
Дата:
Everything you need to see is right here:

[root@<serverNameRemoved> pg_log]# ls -lrt
total 5924
-rw------- 1 postgres postgres  708669 Aug  8 18:59 postgresql-Thu.log
-rw------- 1 postgres postgres  669505 Aug  9 18:59 postgresql-Fri.log
-rw------- 1 postgres postgres  666603 Aug 10 18:56 postgresql-Sat.log
-rw------- 1 postgres postgres  559716 Aug 11 18:59 postgresql-Sun.log
-rw------- 1 postgres postgres  626143 Aug 12 18:56 postgresql-Mon.log
-rw------- 1 postgres postgres 2065282 Aug 13 18:24 postgresql-Tue.log
-rw------- 1 postgres postgres  755099 Aug 13 19:22 postgresql-Wed.log

[root@<serverNameRemoved> pg_log]# date
Tue Aug 13 19:23:53 CDT 2013

so...yah..anyone?

For further information, please see:

It's the "Wed" part that is confusing me...

Re: WTF? 9.2.4 Logs have the wrong day of the week?

От
Lonni J Friedman
Дата:
GMT offset?

On Tue, Aug 13, 2013 at 5:27 PM, Scott Whitney <scott@journyx.com> wrote:
> Everything you need to see is right here:
>
> [root@<serverNameRemoved> pg_log]# ls -lrt
> total 5924
> -rw------- 1 postgres postgres  708669 Aug  8 18:59 postgresql-Thu.log
> -rw------- 1 postgres postgres  669505 Aug  9 18:59 postgresql-Fri.log
> -rw------- 1 postgres postgres  666603 Aug 10 18:56 postgresql-Sat.log
> -rw------- 1 postgres postgres  559716 Aug 11 18:59 postgresql-Sun.log
> -rw------- 1 postgres postgres  626143 Aug 12 18:56 postgresql-Mon.log
> -rw------- 1 postgres postgres 2065282 Aug 13 18:24 postgresql-Tue.log
> -rw------- 1 postgres postgres  755099 Aug 13 19:22 postgresql-Wed.log
>
> [root@<serverNameRemoved> pg_log]# date
> Tue Aug 13 19:23:53 CDT 2013
>
> so...yah..anyone?
>
> For further information, please see:
> http://www.dayoftheweek.org/?m=August&d=13&y=2013&go=Go
>
> It's the "Wed" part that is confusing me...
>



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                                    netllama@gmail.com
LlamaLand                       https://netllama.linux-sxs.org


Re: WTF? 9.2.4 Logs have the wrong day of the week?

От
Tom Lane
Дата:
Scott Whitney <scott@journyx.com> writes:
> Everything you need to see is right here:

Uh, everything except the log_timezone setting.  I believe log files will
be named according to the local time in the log_timezone at the instant
they're created.

            regards, tom lane


Re: WTF? 9.2.4 Logs have the wrong day of the week?

От
Scott Whitney
Дата:
Server is set to "Chicago." CDT (or CST...are we in or out? I never remember...) GMT -6/5. 


-------- Original message --------
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: 08/13/2013 7:54 PM (GMT-06:00)
To: Scott Whitney <swhitney@journyx.com>,Scott Whitney <scott@journyx.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] WTF? 9.2.4 Logs have the wrong day of the week?


Scott Whitney <scott@journyx.com> writes:
> Everything you need to see is right here:

Uh, everything except the log_timezone setting.  I believe log files will
be named according to the local time in the log_timezone at the instant
they're created.

regards, tom lane

Re: WTF? 9.2.4 Logs have the wrong day of the week?

От
Eduardo Morras
Дата:
On Tue, 13 Aug 2013 19:27:14 -0500 (CDT)
Scott Whitney <scott@journyx.com> wrote:

> Everything you need to see is right here:
>
>
>
> [root@<serverNameRemoved> pg_log]# ls -lrt
> total 5924
>
> -rw------- 1 postgres postgres 708669 Aug 8 18:59 postgresql-Thu.log
> -rw------- 1 postgres postgres 669505 Aug 9 18:59 postgresql-Fri.log
> -rw------- 1 postgres postgres 666603 Aug 10 18:56 postgresql-Sat.log
> -rw------- 1 postgres postgres 559716 Aug 11 18:59 postgresql-Sun.log
> -rw------- 1 postgres postgres 626143 Aug 12 18:56 postgresql-Mon.log
> -rw------- 1 postgres postgres 2065282 Aug 13 18:24 postgresql-Tue.log
> -rw------- 1 postgres postgres 755099 Aug 13 19:22 postgresql-Wed.log
>
>
>
> [root@<serverNameRemoved> pg_log]# date
> Tue Aug 13 19:23:53 CDT 2013
>
>
> so...yah..anyone?
>

Did you set a max log of 2MB = 2097152 bytes ? Also, up to day 12, all logs roll at 19:00, perhaps to avoid the name
collisionwith the second log file of day 13, it was saved as next available log name. 

>
> For further information, please see:
> http://www.dayoftheweek.org/?m=August&d=13&y=2013&go=Go
>
>
> It's the "Wed" part that is confusing me...
>


---   ---
Eduardo Morras <emorrasg@yahoo.es>


Re: WTF? 9.2.4 Logs have the wrong day of the week?

От
Christian Ullrich
Дата:
* Scott Whitney wrote:

> Everything you need to see is right here:
>
> [root@<serverNameRemoved> pg_log]# ls -lrt
> total 5924
> -rw------- 1 postgres postgres  708669 Aug  8 18:59 postgresql-Thu.log
> -rw------- 1 postgres postgres  669505 Aug  9 18:59 postgresql-Fri.log
> -rw------- 1 postgres postgres  666603 Aug 10 18:56 postgresql-Sat.log
> -rw------- 1 postgres postgres  559716 Aug 11 18:59 postgresql-Sun.log
> -rw------- 1 postgres postgres  626143 Aug 12 18:56 postgresql-Mon.log
> -rw------- 1 postgres postgres 2065282 Aug 13 18:24 postgresql-Tue.log
> -rw------- 1 postgres postgres  755099 Aug 13 19:22 postgresql-Wed.log
>
> [root@<serverNameRemoved> pg_log]# date
> Tue Aug 13 19:23:53 CDT 2013

log_timezone is set to UTC, which is normally six hours ahead of
Chicago, but does not observe DST, so currently it is five hours ahead.
18:24 plus five is still the same day, 19:22 plus five is the next day.

Quoting the docs:

log_timezone (string)

Sets the time zone used for timestamps written in the server log. Unlike
TimeZone, this value is cluster-wide, so that all sessions will report
timestamps consistently. The built-in default is GMT, but that is
typically overridden in postgresql.conf; initdb will install a setting
there corresponding to its system environment.

--
Christian