Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-04 Thread Hiroshi Saito
Hi Tom-san. My it looks very great.!!! I was operating in the seen last night patch. Naturally, your thing is more great. Thank you very much!:-) Regards, Hiroshi Saito From: Tom Lane [EMAIL PROTECTED] Andrew Dunstan [EMAIL PROTECTED] writes: Tom's idea of a log_timezone seems to make

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Magnus Hagander
On Wed, Aug 01, 2007 at 11:17:21AM +0900, Hiroshi Saito wrote: Hiroshi Saito [EMAIL PROTECTED] writes: [ patch to use pg_strftime in xlog.c ] This code deliberately does not use pg_strftime, for the same reasons that elog.c doesn't use it. I'm inclined to think that an appropriate fix is

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: On Fri, Aug 03, 2007 at 09:01:22AM -0400, Andrew Dunstan wrote: Having talked a bit off-list with Hiroshi-san, he came up with the suggestion taht we should be logging this information in UTC/GMT instead of the servers timezone (for all cases, not just

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Hiroshi Saito
Hi. From: Tom Lane [EMAIL PROTECTED] Gregory Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] writes: I don't think it's an acceptable change in either place. People who want to see UTC in their logs can start the postmaster in UTC. Those who are accustomed to seeing local time

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Hiroshi Saito
Hiroshi Saito [EMAIL PROTECTED] writes: I understand the essence which you say. Then, I think that gmtime is an ideal there. localtime also takes summer time into consideration. It changes and sometimes falls unconsciously. Furthermore, a tzname can't be expressed by the present elog

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Tom Lane
Hiroshi Saito [EMAIL PROTECTED] writes: I understand the essence which you say. Then, I think that gmtime is an ideal there. localtime also takes summer time into consideration. It changes and sometimes falls unconsciously. Furthermore, a tzname can't be expressed by the present elog

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] writes: I don't think it's an acceptable change in either place. People who want to see UTC in their logs can start the postmaster in UTC. Those who are accustomed to seeing local time will squawk. It would probably make

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Magnus Hagander
On Fri, Aug 03, 2007 at 09:01:22AM -0400, Andrew Dunstan wrote: [ patch to use pg_strftime in xlog.c ] This code deliberately does not use pg_strftime, for the same reasons that elog.c doesn't use it. I'm inclined to think that an appropriate fix is the same as we use in elog.c,

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Andrew Dunstan
Magnus Hagander wrote: On Wed, Aug 01, 2007 at 11:17:21AM +0900, Hiroshi Saito wrote: Hiroshi Saito [EMAIL PROTECTED] writes: [ patch to use pg_strftime in xlog.c ] This code deliberately does not use pg_strftime, for the same reasons that elog.c doesn't use it. I'm

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Tom's idea of a log_timezone seems to make sense. I'll code that up and see if there are any unexpected gotchas. regards, tom lane ---(end of broadcast)--- TIP 4: Have you searched

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Magnus Hagander [EMAIL PROTECTED] writes: On Fri, Aug 03, 2007 at 09:01:22AM -0400, Andrew Dunstan wrote: Having talked a bit off-list with Hiroshi-san, he came up with the suggestion taht we should be logging this information in UTC/GMT instead of the

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Andrew Dunstan
Gregory Stark wrote: Well even if we include the time in integer seconds-since-unix-epoch format it would be useful for a CSV data format. That's probably the worst of all possible options. Two very common uses of CSVlogs will be a) to load them into a PostgreSQL table and b) to

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Michael Glaesemann
On Aug 3, 2007, at 10:33 , Tom Lane wrote: People who find the above arguments compelling would certainly be free to set their log_timezone to GMT. Those who don't find them compelling should not be forced to deal in GMT. The fact that Postgres has always logged in system local time,

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Gregory Stark
Andrew Dunstan [EMAIL PROTECTED] writes: That's probably the worst of all possible options. Two very common uses of CSVlogs will be a) to load them into a PostgreSQL table and b) to load them into a spreadsheet such as Excel. In both cases having a Unix epoch time rather than a timestamp

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Hiroshi Saito
Andrew Dunstan [EMAIL PROTECTED] writes: Tom's idea of a log_timezone seems to make sense. I'll code that up and see if there are any unexpected gotchas. BTW, windows user should do how.? How do you think? Does it say Set up an environment variable? set TZ= Regards, Hiroshi Saito

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Gregory Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] writes: I don't think it's an acceptable change in either place. People who want to see UTC in their logs can start the postmaster in UTC. Those who are accustomed to seeing local time

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Tom Lane
Hiroshi Saito [EMAIL PROTECTED] writes: BTW, windows user should do how.? How do you think? Does it say Set up an environment variable? set TZ= What do they do now to set the postmaster's timezone? That would determine log_timezone too, if they don't override it in postgresql.conf.

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Magnus Hagander
Tom Lane wrote: Hiroshi Saito [EMAIL PROTECTED] writes: BTW, windows user should do how.? How do you think? Does it say Set up an environment variable? set TZ= What do they do now to set the postmaster's timezone? That would determine log_timezone too, if they don't override it in

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-08-03 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Tom's idea of a log_timezone seems to make sense. Here's a preliminary patch for this --- no docs yet, but code is all there. Seems to work OK. The patch is larger than it'd really have to be because I chose to rename global_timezone to

[PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-07-31 Thread Hiroshi Saito
Hi. (sorry, this mail is UTF8) This problem is remarkable in the Japanese windows environment It appears in a log outputSee, - LOG: database system was shut down at 2007-07-31 19:23:25 東京 (標準時) LOG: database system is ready to accept connections LOG: autovacuum launcher started (This

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-07-31 Thread Tom Lane
Hiroshi Saito [EMAIL PROTECTED] writes: [ patch to use pg_strftime in xlog.c ] This code deliberately does not use pg_strftime, for the same reasons that elog.c doesn't use it. I'm inclined to think that an appropriate fix is the same as we use in elog.c, ie, don't use %Z at all under Windows.

Re: [PATCHES] Correction of how to use TimeZone by ControlFile(xlog.c)

2007-07-31 Thread Hiroshi Saito
Hi Tom-san. From: Tom Lane Hiroshi Saito [EMAIL PROTECTED] writes: [ patch to use pg_strftime in xlog.c ] This code deliberately does not use pg_strftime, for the same reasons that elog.c doesn't use it. I'm inclined to think that an appropriate fix is the same as we use in elog.c, ie,