Re: [HACKERS] [PATCHES] log session end - again

2004-02-16 Thread Bruce Momjian
Patch applied. Thanks. I modified the doc wording a bit --- patch attached. --- Andrew Dunstan wrote: > > You can find it here. > > http://archives.postgresql.org/pgsql-patches/2004-02/msg00072.php > > I know Neil was

Re: [HACKERS] [PATCHES] log session end - again

2004-02-13 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches I will try to apply it within the next 48 hours. --- Andrew Dunstan wrote: > > You can find i

Re: [HACKERS] [PATCHES] log session end - again

2004-02-13 Thread Andrew Dunstan
You can find it here. http://archives.postgresql.org/pgsql-patches/2004-02/msg00072.php I know Neil was reviewing it and had a minor doc style quibble, as well as the question he raised on -hackers about psql tab completion. cheers andrew Bruce Momjian wrote: Andrew Dunstan wrote: Based o

Re: [HACKERS] [PATCHES] log session end - again

2004-02-12 Thread Bruce Momjian
Andrew Dunstan wrote: > Based on Larry's idea, I had in mind to provide a third escape in the > log_line_info string (in addition to the %U and %D that I had previously > done) of %S for sessionid, which would look something like this: > 402251fc.713f > > I will start redoing this feature when

Re: [HACKERS] [PATCHES] log session end - again

2004-02-05 Thread Andrew Dunstan
Chester Kustarz wrote: On Thu, 5 Feb 2004, Bruce Momjian wrote: Wow, like the idea too --- pid plus time_t start time of backend. Actully, it would be good to have star time first so you can sort everything in order of start time. Why not just add a printf like pattern so the user can ou

Re: [HACKERS] [PATCHES] log session end - again

2004-02-05 Thread Chester Kustarz
On Thu, 5 Feb 2004, Bruce Momjian wrote: > Wow, like the idea too --- pid plus time_t start time of backend. > Actully, it would be good to have star time first so you can sort > everything in order of start time. Why not just add a printf like pattern so the user can output whatever they like? %

Re: [HACKERS] [PATCHES] log session end - again

2004-02-05 Thread Andrew Dunstan
Bruce Momjian wrote: Tom Lane wrote: Larry's idea about combining PID and backend start time didn't sound too unreasonable to me. Wow, like the idea too --- pid plus time_t start time of backend. Actully, it would be good to have star time first so you can sort everything in order of st

Re: [HACKERS] [PATCHES] log session end - again

2004-02-05 Thread Bruce Momjian
Tom Lane wrote: > Andrew Dunstan <[EMAIL PROTECTED]> writes: > > Right. And if we have sessionids we would want them logged there, I > > think. And that would rule out anything based on xid or backend pid. > > Uh, what's wrong with backend pid? Since we fork before we start doing > anything wit

Re: [HACKERS] [PATCHES] log session end - again

2004-02-03 Thread Andrew Dunstan
Tom Lane said: > Andrew Dunstan <[EMAIL PROTECTED]> writes: >> Right. And if we have sessionids we would want them logged there, I >> think. And that would rule out anything based on xid or backend pid. > > Uh, what's wrong with backend pid? Since we fork before we start doing > anything with a co

Re: [HACKERS] [PATCHES] log session end - again

2004-02-03 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Right. And if we have sessionids we would want them logged there, I > think. And that would rule out anything based on xid or backend pid. Uh, what's wrong with backend pid? Since we fork before we start doing anything with a connection, it should su

Re: [HACKERS] [PATCHES] log session end - again

2004-02-03 Thread Andrew Dunstan
Tom Lane wrote: Bruce Momjian <[EMAIL PROTECTED]> writes: Andrew Dunstan wrote: Bruce and others have suggested that PID is not sufficiently unique. The nice things about using xid for session id is that is is unique for a long time, rather than pid. Hmm. Now that I think

Re: [HACKERS] [PATCHES] log session end - again

2004-02-03 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Andrew Dunstan wrote: >> Bruce and others have suggested that PID is not sufficiently unique. > The nice things about using xid for session id is that is is unique for > a long time, rather than pid. Hmm. Now that I think about it, InitPostgres() alwa

Re: [HACKERS] [PATCHES] log session end - again

2004-02-03 Thread Bruce Momjian
Andrew Dunstan wrote: > Tom Lane said: > > Andrew Dunstan <[EMAIL PROTECTED]> writes: > >> I'm not sure I understand. I didn't suggest that a sequence should be > >> used for txn ids. For the purpose I had in mind we would call > >> nextval() once per connection, > > > > Oh, okay, I misunderstood.

Re: [HACKERS] [PATCHES] log session end - again

2004-02-03 Thread Andrew Dunstan
Tom Lane said: > Andrew Dunstan <[EMAIL PROTECTED]> writes: >> I'm not sure I understand. I didn't suggest that a sequence should be >> used for txn ids. For the purpose I had in mind we would call >> nextval() once per connection, > > Oh, okay, I misunderstood. But why not just use the PID? > B

Re: [HACKERS] [PATCHES] log session end - again

2004-02-03 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > I'm not sure I understand. I didn't suggest that a sequence should be > used for txn ids. For the purpose I had in mind we would call nextval() > once per connection, Oh, okay, I misunderstood. But why not just use the PID? r

Re: [HACKERS] [PATCHES] log session end - again

2004-02-02 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: Bruce Momjian wrote: Also, Andrew, on your other patch for log_session_info line, Magnus had the idea of giving each session an id based on the first transaction of the session. I did think about using a cluster-wide se

Re: [HACKERS] [PATCHES] log session end - again

2004-02-02 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Bruce Momjian wrote: >> Also, Andrew, on your other patch for log_session_info line, Magnus had >> the idea of giving each session an id based on the first transaction of >> the session. > I did think about using a cluster-wide sequence, if we can make

Re: [HACKERS] [PATCHES] log session end - again

2004-02-02 Thread Andrew Dunstan
Bruce Momjian wrote: Also, Andrew, on your other patch for log_session_info line, Magnus had the idea of giving each session an id based on the first transaction of the session. That seems like a useful addition to that variable, though I am not sure what value to give a session before it execu

Re: [HACKERS] [PATCHES] log session end - again

2004-02-02 Thread Bruce Momjian
Also, Andrew, on your other patch for log_session_info line, Magnus had the idea of giving each session an id based on the first transaction of the session. That seems like a useful addition to that variable, though I am not sure what value to give a session before it executes its first query. -

Re: [HACKERS] [PATCHES] log session end - again

2004-02-02 Thread Andrew Dunstan
Bruce Momjian wrote: Andrew Dunstan wrote: [redirecting to hackers] If you like. I originally just made it happen if log_connections was set, but Neil wanted a separate setting for it. What is the consensus about a name? log_disconnect? Not bad. Maybe for symmetry "log_disconnectio

Re: [HACKERS] [PATCHES] log session end - again

2004-02-02 Thread Bruce Momjian
Andrew Dunstan wrote: > [redirecting to hackers] > > If you like. I originally just made it happen if log_connections was > set, but Neil wanted a separate setting for it. What is the consensus > about a name? log_disconnect? -- Bruce Momjian| http://candle.pha.pa.u

Re: [HACKERS] [PATCHES] log session end - again

2004-02-02 Thread Andrew Dunstan
[redirecting to hackers] If you like. I originally just made it happen if log_connections was set, but Neil wanted a separate setting for it. What is the consensus about a name? cheers andrew Peter Eisentraut wrote: Andrew Dunstan wrote: This patch brings up to date what I did last year (