Re: [PATCHES] [SQL] array_in: '{}}'::text[]

2004-08-27 Thread Tom Lane
Joe Conway <[EMAIL PROTECTED]> writes: > /* Make a modifiable copy of the input */ > ! string_save = (char *) palloc0(strlen(string) + 1); > strcpy(string_save, string); palloc0, instead of palloc, is clearly a waste of cycles here ... actually, why isn't this just a pstrdup? >

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Ed L.
On Friday August 27 2004 4:34, Ed L. wrote: > > One other thing I've been thinking of suggesting is that the > > next-rotation-target-time be rounded to an exact multiple of > > log_rotation_age. So for example if you set log_rotation_age = 60 > > minutes then rotations will happen at the top of t

[PATCHES] Show full path name when saving in psql

2004-08-27 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message This patch shows the full path name when doing a \s in psql, if you have previously issued a \cd command. -- Greg Sabino Mullane [EMAIL PROTECTED] PGP Key: 0x14964AC8 200408271849 Index: c

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Ed L.
On Friday August 27 2004 3:49, Tom Lane wrote: > > A potential problem is what about size-driven rotation? If the hourly > output exceeds log_rotation_size then you'd truncate and rewrite the > current file, which is just exactly not what you want :-(. You could > say that truncation occurs only

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > On Friday August 27 2004 1:15, Tom Lane wrote: >> Yeah, and it would also prevent a risk I now see with your initial >> patch: if no %, it'll write the same filename each time, which >> is almost certainly not desired. Works for me. > I think this turns out t

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > One addition I'd like to include with the revised patch: a boolean > postgresql.conf option ('log_truncate_on_rotation', default false) to > truncate any existing log file by the same name. Default behavior here and > with Apache is to always append, but i

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Ed L.
On Friday August 27 2004 1:15, Tom Lane wrote: > "Ed L." <[EMAIL PROTECTED]> writes: > > On Friday August 27 2004 1:03, Tom Lane wrote: > >> Hmm ... there isn't any way to emulate that with strftime escapes, > >> unless I missed the right one. > > > > If you supply an escape, Apache will override t

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Ed L.
On Friday August 27 2004 2:15, Tom Lane wrote: > "Ed L." <[EMAIL PROTECTED]> writes: > > If log_filename = 'xxx', rotate with strftime() to > > 'xxx-%Y-%m-%d_%H%M%S' > > No, I was thinking that if no %'s in the log_filename, then use xxx.EPOCH > to provide Apache compatibility. OK, that works for

Re: [PATCHES] [SQL] array_in: '{}}'::text[]

2004-08-27 Thread Joe Conway
Joe Conway wrote: Markus Bertheau wrote: Is there a reason the array_in parser accepts additional closing braces at the end? oocms=# SELECT '{}}'::text[]; text -- {} (1 ÑÑ) Hmmm, I was *about* to say that this is fixed in cvs (and indeed, the array_in parser is significantly tightened u

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > If log_filename = 'xxx', rotate with strftime() to 'xxx-%Y-%m-%d_%H%M%S' No, I was thinking that if no %'s in the log_filename, then use xxx.EPOCH to provide Apache compatibility. regards, tom lane ---(end of b

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Ed L.
On Friday August 27 2004 1:39, Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Ah, so we keep the existing format but drop the pid, and just make it > > changable by the user, and we rename it. Doesn't sound as drastic as > > it first did. > > Yeah, the only change in default behav

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Ah, so we keep the existing format but drop the pid, and just make it > changable by the user, and we rename it. Doesn't sound as drastic as it > first did. Yeah, the only change in default behavior would be to drop the PID part of the log filename, whi

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Bruce Momjian
Tom Lane wrote: > Andreas Pflug <[EMAIL PROTECTED]> writes: > > I don't have the time now to review the impact, but this might make > > interpreting the log filename difficult or impossible, effectively > > corrupting pg_logdir_ls. > > So if you want to use that, you use a format that it can cop

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Tom Lane
Andreas Pflug <[EMAIL PROTECTED]> writes: > I don't have the time now to review the impact, but this might make > interpreting the log filename difficult or impossible, effectively > corrupting pg_logdir_ls. So if you want to use that, you use a format that it can cope with. I don't see a proble

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Andrew Dunstan
Tom Lane wrote: "Ed L." <[EMAIL PROTECTED]> writes: On Friday August 27 2004 12:41, Tom Lane wrote: BTW, as long as we are taking Apache as the de facto standard --- does the default of "postgresql-%Y-%m-%d_%H%M%S.log" actually make sense, or would something different be closer to the comm

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > On Friday August 27 2004 1:03, Tom Lane wrote: >> Hmm ... there isn't any way to emulate that with strftime escapes, >> unless I missed the right one. > If you supply an escape, Apache will override that default epoch. So I > could see setting the default to

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Andreas Pflug
Tom Lane wrote: "Ed L." <[EMAIL PROTECTED]> writes: Attached is a patch which replaces the 'log_filename_prefix' configuration directive with a similar 'log_filename' directive. + changes the default log filename to exclude the PID; This would be better stated as "makes it impossible to use the

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Ed L.
On Friday August 27 2004 1:03, Tom Lane wrote: > "Ed L." <[EMAIL PROTECTED]> writes: > > On Friday August 27 2004 12:41, Tom Lane wrote: > >> BTW, as long as we are taking Apache as the de facto standard --- does > >> the default of "postgresql-%Y-%m-%d_%H%M%S.log" actually make sense, > >> or woul

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > On Friday August 27 2004 12:41, Tom Lane wrote: >> BTW, as long as we are taking Apache as the de facto standard --- does >> the default of "postgresql-%Y-%m-%d_%H%M%S.log" actually make sense, or >> would something different be closer to the common practice wi

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > If the PID isn't there is there a danger of different postmasters > clobbering each other's logs? Only if they're logging into the same directory with the same filename pattern. This isn't the default (the default log_directory is under $PGDATA), and

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Andrew Dunstan
Tom Lane wrote: "Ed L." <[EMAIL PROTECTED]> writes: On Friday August 27 2004 12:08, Tom Lane wrote: [ justification please ] Yes, should have said more on that item. First, I didn't see how to easily make it configurable in combination with strftime() without doing more work,

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Ed L.
On Friday August 27 2004 12:51, Ed L. wrote: > On Friday August 27 2004 12:41, Tom Lane wrote: > > BTW, as long as we are taking Apache as the de facto standard --- does > > the default of "postgresql-%Y-%m-%d_%H%M%S.log" actually make sense, or > > would something different be closer to the common

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Ed L.
On Friday August 27 2004 12:41, Tom Lane wrote: > > BTW, as long as we are taking Apache as the de facto standard --- does > the default of "postgresql-%Y-%m-%d_%H%M%S.log" actually make sense, or > would something different be closer to the common practice with Apache? Apache defaults to access_l

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > On Friday August 27 2004 12:08, Tom Lane wrote: >> [ justification please ] > Yes, should have said more on that item. First, I didn't see how to easily > make it configurable in combination with strftime() without doing more > work, and it didn't appear to

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Ed L.
On Friday August 27 2004 12:08, Tom Lane wrote: > "Ed L." <[EMAIL PROTECTED]> writes: > > Attached is a patch which replaces the 'log_filename_prefix' > > configuration directive with a similar 'log_filename' directive. > > + changes the default log filename to exclude the PID; > > This would b

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > Attached is a patch which replaces the 'log_filename_prefix' configuration > directive with a similar 'log_filename' directive. > + changes the default log filename to exclude the PID; This would be better stated as "makes it impossible to use the PID i

Re: [PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Ed L.
The patch is intended for 8.0.0 or later, and was generated and tested with the cvs trunk as of 26-Aug-2004. On Friday August 27 2004 11:50, Ed L. wrote: > Attached is a patch which replaces the 'log_filename_prefix' > configuration directive with a similar 'log_filename' directive. It > differs

[PATCHES] log_filename_prefix --> log_filename + strftime()

2004-08-27 Thread Ed L.
Attached is a patch which replaces the 'log_filename_prefix' configuration directive with a similar 'log_filename' directive. It differs from the former in the following ways: + allows embedded strftime() escapes ala Apache's rotatelogs; + eliminates hard-coded embedding of the