Re: statement logging / extended query protocol issues

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: statement logging / extended query protocol issues
Дата
Msg-id 200509080741.j887fWG29640@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: statement logging / extended query protocol issues  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
Oh, I didn't realize a FETCH would show up as an EXECUTE.  That is wrong
and should be fixed because a user-level FETCH shows up as a fetch, not
as the original query.

---------------------------------------------------------------------------

Simon Riggs wrote:
> > Oliver Jowett wrote:
> > > 8.1-beta1 produces some odd results with statement logging enabled when
> > > the extended query protocol is used (e.g. when using the JDBC driver).
> > > Repeatedly running a simple query with log_statement = 'all' produces this: 
> ... 
> 
> > > Secondly, running a query that uses portals produces output like this:
> > > 
> > > LOG:  statement: PREPARE S_3 AS SELECT * from pg_proc
> > > LOG:  statement: <BIND> C_4
> > > LOG:  statement: EXECUTE C_4  [PREPARE:  SELECT * from pg_proc]
> > > LOG:  statement: EXECUTE C_4  [PREPARE:  SELECT * from pg_proc]
> > > LOG:  statement: EXECUTE C_4  [PREPARE:  SELECT * from pg_proc]
> > > LOG:  statement: EXECUTE C_4  [PREPARE:  SELECT * from pg_proc]
> > > LOG:  statement: EXECUTE C_4  [PREPARE:  SELECT * from pg_proc]
> > > LOG:  statement: EXECUTE C_4  [PREPARE:  SELECT * from pg_proc]
> > > LOG:  statement: EXECUTE C_4  [PREPARE:  SELECT * from pg_proc]
> > > 
> > > Comments:
> > > - The <BIND> is still fairly content-free.
> > > - The EXECUTEs are a bit misleading as the SELECT was actually only run
> > > once (there are multiple Execute messages for the same portal). You
> > > could infer that there is only one SELECT from the repeated portal name
> > > and the lack of an intervening <BIND>, I suppose.
> 
> I've put together this prototype to offer more useful messages in the
> situation Oliver describes.
> 
> Subsequent calls to the same portal are described as FETCHes rather than
> as EXECUTEs. The portal name is still given and number of rows is
> provided also.
> 
> I haven't tested this with the java program supplied, since this is a
> fairly short-hack for comments. I'll correct any mistakes before
> submission to patches.
> 
> Comments?
> 
> Best Regards, Simon Riggs

[ Attachment, skipping... ]

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Update timezone data files to release 2005m of the zic database.
Следующее
От: ITAGAKI Takahiro
Дата:
Сообщение: Alternative variable length structure