Re: [HACKERS] Adding error message "source"

2009-08-10 Thread Bruce Momjian
Magnus Hagander wrote: > On Thu, Aug 6, 2009 at 19:04, Peter Eisentraut wrote: > > On Thursday 06 August 2009 17:33:40 Tom Lane wrote: > >> I don't think there'd be much logical difficulty in having an output > >> field (ie, CSV column or log_line_prefix escape) that represents a > >> classificatio

Re: [HACKERS] Adding error message "source"

2009-08-10 Thread Magnus Hagander
On Thu, Aug 6, 2009 at 19:04, Peter Eisentraut wrote: > On Thursday 06 August 2009 17:33:40 Tom Lane wrote: >> I don't think there'd be much logical difficulty in having an output >> field (ie, CSV column or log_line_prefix escape) that represents a >> classification of the PID, say as "postmaster,

Re: [HACKERS] Adding error message "source"

2009-08-06 Thread Peter Eisentraut
On Thursday 06 August 2009 17:33:40 Tom Lane wrote: > I don't think there'd be much logical difficulty in having an output > field (ie, CSV column or log_line_prefix escape) that represents a > classification of the PID, say as "postmaster, backend, AV worker, > AV launcher, bgwriter, ...". It wou

Re: [HACKERS] Adding error message "source"

2009-08-06 Thread Tom Lane
Magnus Hagander writes: > On Thu, Aug 6, 2009 at 16:33, Tom Lane wrote: >> I don't think there'd be much logical difficulty in having an output >> field (ie, CSV column or log_line_prefix escape) that represents a >> classification of the PID, say as "postmaster, backend, AV worker, >> AV launcher

Re: [HACKERS] Adding error message "source"

2009-08-06 Thread Magnus Hagander
On Thu, Aug 6, 2009 at 16:33, Tom Lane wrote: > Magnus Hagander writes: >> On Thu, Aug 6, 2009 at 16:20, Tom Lane wrote: >>> Well, it seems like you could get 90% of the way there just by filtering >>> on the PID --- watching the bgwriter, walwriter, and archiver should >>> cover this use-case rea

Re: [HACKERS] Adding error message "source"

2009-08-06 Thread Tom Lane
Magnus Hagander writes: > On Thu, Aug 6, 2009 at 16:20, Tom Lane wrote: >> Well, it seems like you could get 90% of the way there just by filtering >> on the PID --- watching the bgwriter, walwriter, and archiver should >> cover this use-case reasonably well. > Right. But that's pretty hard to do

Re: [HACKERS] Adding error message "source"

2009-08-06 Thread Magnus Hagander
On Thu, Aug 6, 2009 at 16:20, Tom Lane wrote: > Magnus Hagander writes: >> On Wed, Aug 5, 2009 at 16:11, Heikki >> Linnakangas wrote: >>> Would you like to propose a concrete list sources that we would have? >>> The implementation effort depends a lot on the categorization. > >> Well, the only one

Re: [HACKERS] Adding error message "source"

2009-08-06 Thread Tom Lane
Magnus Hagander writes: > On Wed, Aug 5, 2009 at 16:11, Heikki > Linnakangas wrote: >> Would you like to propose a concrete list sources that we would have? >> The implementation effort depends a lot on the categorization. > Well, the only one I have a direct usecase for is the one that is "I > w

Re: [HACKERS] Adding error message "source"

2009-08-06 Thread Magnus Hagander
On Wed, Aug 5, 2009 at 16:11, Heikki Linnakangas wrote: > Magnus Hagander wrote: >> As for the source, I think we'd just "decorate" the error messages >> with errsource(ERRSOURCE_USER) or something like that at places where >> needed, and have it default to "internal" - so we don't have to touch >>

Re: [HACKERS] Adding error message "source"

2009-08-06 Thread Peter Eisentraut
On Wednesday 05 August 2009 17:45:46 Pavel Stehule wrote: > SQLCODE could carry enough information about user or system exception. > There are reserved space for custom codes. Maybe for administration > should be interesting, if error is system error or application error - > but this should be desc

Re: [HACKERS] Adding error message "source"

2009-08-05 Thread Pavel Stehule
2009/8/5 Magnus Hagander : > Since Alvaro is talking about error messages in another thread, I > figured I should post this idea now as well. > > Something that keeps annoying me a lot when trying to look through > what comes out of PostgreSQL logs is that errors generated by the user > (syntax err

Re: [HACKERS] Adding error message "source"

2009-08-05 Thread Heikki Linnakangas
Magnus Hagander wrote: > Something that keeps annoying me a lot when trying to look through > what comes out of PostgreSQL logs is that errors generated by the user > (syntax errors in queries, warnings due to incorrect string escaping, > statements terminated due to timeout etc etc) are intermixed

Re: [HACKERS] Adding error message "source"

2009-08-05 Thread Tom Lane
Magnus Hagander writes: > I'd like to add another field to messages called "source" (not wedded > to the name). Initially, this could just be "user" and "internal", but > I can see a use-case in the future for it to differ between for > example "archiver" and "bgwriter" (it's certainly not unheard

[HACKERS] Adding error message "source"

2009-08-05 Thread Magnus Hagander
Since Alvaro is talking about error messages in another thread, I figured I should post this idea now as well. Something that keeps annoying me a lot when trying to look through what comes out of PostgreSQL logs is that errors generated by the user (syntax errors in queries, warnings due to incorr