Re: [HACKERS] [pgsql-patches] [PATCHES] Patch to log usage of temporary

2007-01-12 Thread Bruce Momjian
Guillaume Smet wrote: Hi all, Sorry for arriving so late into the discussion. I don't know if it's possible but it could be useful to have the text of the query which required the creation of the temporary files as an additional DETAIL line. At least, if it's possible to have it in this

Re: [HACKERS] [pgsql-patches] [PATCHES] Patch to log usage of temporary files

2007-01-12 Thread Guillaume Smet
Hi Bruce, Thanks for your answer. On 1/12/07, Bruce Momjian [EMAIL PROTECTED] wrote: We have the ability to conditionally print statements based on error level, but LOG isn't a valid level for log_min_error_statement. We could add a parameter that few people would use, but the right way to do

Re: [HACKERS] [pgsql-patches] [PATCHES] Patch to log usage of temporary files

2007-01-12 Thread Tom Lane
Guillaume Smet [EMAIL PROTECTED] writes: That's not what I had in mind. I was asking if the text of the query was available when logging the temp file usage. If so it could be good to add a DETAIL line with it directly and systematically when logging the temp file usage. (1) you could make

Re: [HACKERS] [pgsql-patches] [PATCHES] Patch to log usage of temporary

2007-01-12 Thread Bruce Momjian
Guillaume Smet wrote: Hi Bruce, Thanks for your answer. On 1/12/07, Bruce Momjian [EMAIL PROTECTED] wrote: We have the ability to conditionally print statements based on error level, but LOG isn't a valid level for log_min_error_statement. We could add a parameter that few people

Re: [HACKERS] [pgsql-patches] [PATCHES] Patch to log usage of temporary files

2007-01-12 Thread Guillaume Smet
On 1/12/07, Bruce Momjian [EMAIL PROTECTED] wrote: Usually people don't want th query unless they ask for it. One nify trick would be to print the query as DETAIL unless they are already logging queries, but that just seems too complex. If you want the query, why not just log them all?

Re: [HACKERS] [pgsql-patches] [PATCHES] Patch to log usage of temporary files

2007-01-12 Thread Guillaume Smet
On 1/12/07, Tom Lane [EMAIL PROTECTED] wrote: Guillaume Smet [EMAIL PROTECTED] writes: That's not what I had in mind. I was asking if the text of the query was available when logging the temp file usage. If so it could be good to add a DETAIL line with it directly and systematically when

Re: [HACKERS] [pgsql-patches] [PATCHES] Patch to log usage of temporary files

2007-01-12 Thread Tom Lane
Guillaume Smet [EMAIL PROTECTED] writes: On 1/12/07, Tom Lane [EMAIL PROTECTED] wrote: (2) there is already a generalized solution to this, it's called log_min_error_statement. I didn't think of that when posting my message but Bruce seems to say that we can't use it in this case. Dunno why

Re: [HACKERS] [pgsql-patches] [PATCHES] Patch to log usage of temporary

2007-01-12 Thread Bruce Momjian
Guillaume Smet wrote: On 1/12/07, Bruce Momjian [EMAIL PROTECTED] wrote: Usually people don't want th query unless they ask for it. One nify trick would be to print the query as DETAIL unless they are already logging queries, but that just seems too complex. If you want the query, why

Re: [HACKERS] [pgsql-patches] [PATCHES] Patch to log usage of temporary files

2007-01-12 Thread Bill Moran
In response to Guillaume Smet [EMAIL PROTECTED]: On 1/12/07, Bruce Momjian [EMAIL PROTECTED] wrote: Usually people don't want th query unless they ask for it. One nify trick would be to print the query as DETAIL unless they are already logging queries, but that just seems too complex. If