Re: [HACKERS] Backend Stats Enhancement Request

2008-06-22 Thread Alvaro Herrera
Thomas Lee wrote: > Thanks for the feedback Tom. An initial patch for this has been posted > to pgsql-patches. Thanks for the patch. I have added it to the current Commitfest wiki page. If you plan to continue sending patches, please make sure you get an account to do that yourself. Thanks.

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-22 Thread Thomas Lee
Thanks for the feedback Tom. An initial patch for this has been posted to pgsql-patches. Cheers, T Tom Lane wrote: Thomas Lee <[EMAIL PROTECTED]> writes: How does this sound: * A new GUC variable -- "activity_message_size" -- will be introduced Well, "message" doesn't see

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-20 Thread Tom Lane
Robert Treat <[EMAIL PROTECTED]> writes: > On Friday 20 June 2008 10:49:49 Tom Lane wrote: >> Be specific: >> "Sets the maximum length of pg_stat_activity.current_query." > I think there are other places this might manifest itself besides > pg_stat_activity... No, there aren't. I'm struggling

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-20 Thread Robert Treat
On Friday 20 June 2008 10:49:49 Tom Lane wrote: > Thomas Lee <[EMAIL PROTECTED]> writes: > > How does this sound: > > > > * A new GUC variable -- "activity_message_size" -- will be introduced > > Well, "message" doesn't seem quite le mot juste to me for a column that > is displaying a SQL command.

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-20 Thread Decibel!
On Jun 20, 2008, at 11:48 AM, Tom Lane wrote: Decibel! <[EMAIL PROTECTED]> writes: I realize we just got rid of stats_command_string, but if we're adding a GUC back in we might as well allow it to be set to 0 which disables logging. How would that not duplicate track_activities? Sorry, I th

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-20 Thread Tom Lane
Decibel! <[EMAIL PROTECTED]> writes: > I realize we just got rid of stats_command_string, but if we're > adding a GUC back in we might as well allow it to be set to 0 which > disables logging. How would that not duplicate track_activities? regards, tom lane -- Sent v

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-20 Thread Decibel!
On Jun 20, 2008, at 9:49 AM, Tom Lane wrote: * Minimum value of PGBE_DEFAULT_ACTIVITY_SIZE, maximum value of INT_MAX? I was thinking about a range of 100 to 100K or thereabouts. INT_MAX is just silly... I realize we just got rid of stats_command_string, but if we're adding a GUC back in

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-20 Thread Tom Lane
Thomas Lee <[EMAIL PROTECTED]> writes: > How does this sound: > * A new GUC variable -- "activity_message_size" -- will be introduced Well, "message" doesn't seem quite le mot juste to me for a column that is displaying a SQL command. Usually we'd use "statement", "command", or "query" to refer

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-20 Thread Thomas Lee
Hi, I'm new to the postgresql source, thought I'd try my hand at implementing the change suggested (i.e. the GUC-ification of the PGBE_ACTIVITY_SIZE constant) to get my hands dirty with the code. How does this sound: * A new GUC variable -- "activity_message_size" -- will be introduced * The

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-19 Thread David Miller
> That's not where the problem is. The people who will be left holding > the short end of the stick are the ones who can't raise their SHMMAX > setting past a couple of megabytes. > > It might be feasible to make pg_stat_activity's max string length > a postmaster-start-time configuration option.

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-19 Thread Joshua D. Drake
Tom Lane wrote: Decibel! <[EMAIL PROTECTED]> writes: That's not where the problem is. The people who will be left holding the short end of the stick are the ones who can't raise their SHMMAX setting past a couple of megabytes. It might be feasible to make pg_stat_activity's max string length a

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-19 Thread Tom Lane
Decibel! <[EMAIL PROTECTED]> writes: > Also, I don't necessarily buy that 32k * max_connections is too much > shared memory; even with max_connections of 1000 that's only 32M, > which is trivial for any box that's actually configured for 1000 > connections. That's not where the problem is.

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-19 Thread Decibel!
On Jun 19, 2008, at 10:26 AM, Alvaro Herrera wrote: David Miller wrote: That is fine.. Maybe a dynamic configurable parameter that can be set/updated while the database is running. If it were a parameter, it could not be changed while the database is running. This issue lies in the fact that

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-19 Thread Alvaro Herrera
David Miller wrote: > That is fine.. Maybe a dynamic configurable parameter that can be > set/updated while the database is running. If it were a parameter, it could not be changed while the database is running. > This issue lies in the fact that we have queries larger than 1K and we > would lik

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-19 Thread David Miller
David Miller <[EMAIL PROTECTED]> writes: > I would like to request a change to the PGBE_ACTIVITY_SIZE #define in the > pgstat.h file. This value determines the max length of the SQL query > contained in the PgBackendStatus structure. > By increasing the value of this #define to 32768 we are

Re: [HACKERS] Backend Stats Enhancement Request

2008-06-19 Thread Tom Lane
David Miller <[EMAIL PROTECTED]> writes: > I would like to request a change to the PGBE_ACTIVITY_SIZE #define in the > pgstat.h file. This value determines the max length of the SQL query > contained in the PgBackendStatus structure. > By increasing the value of this #define to 32768 we are able

[HACKERS] Backend Stats Enhancement Request

2008-06-19 Thread David Miller
I would like to request a change to the PGBE_ACTIVITY_SIZE #define in the pgstat.h file. This value determines the max length of the SQL query contained in the PgBackendStatus structure. By increasing the value of this #define to 32768 we are able to capture queries larger than the 1024 defaul