Re: exec_execute_message crush

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: exec_execute_message crush
Дата
Msg-id 20091229.152231.68307810.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: exec_execute_message crush  (Kris Jurka <books@ejurka.com>)
Список pgsql-hackers
> > parse
> > bind
> > describe
> > execute
> > <normaly done>
> > parse invalid SQL thus abort a transaction
> > bind (error)
> > describe (error)
> > execute (crush)
> >
> > Please note that without pgpool backend does not crush. This is
> > because JDBC driver does not do execute() if prior parse, bind
> > etc. failed, I think.
> 
> The JDBC driver will fire away parse, bind, and execute all at once before 
> a sync, to avoid network roundtrips, so your assumption of what's going on 
> here without pgpool doesn't seem accurate.  Attached is a test case that 
> tries to duplicate what you've described and it errors out normally. 
> Below is the JDBC driver's protocol level logging.
> 
> 21:41:39.407 (1)  FE=> Parse(stmt=S_1,query="BEGIN",oids={})
> 21:41:39.407 (1)  FE=> Bind(stmt=S_1,portal=null)
> 21:41:39.407 (1)  FE=> Execute(portal=null,limit=0)
> 21:41:39.408 (1)  FE=> Parse(stmt=null,query="SELECT $1 ",oids={23})
> 21:41:39.408 (1)  FE=> Bind(stmt=null,portal=null,$1=<'1'>)
> 21:41:39.408 (1)  FE=> Describe(portal=null)
> 21:41:39.408 (1)  FE=> Execute(portal=null,limit=0)
> 21:41:39.408 (1)  FE=> Parse(stmt=null,query=" SELECT SELECT $1 
> ",oids={23})
> 21:41:39.408 (1)  FE=> Bind(stmt=null,portal=null,$1=<'2'>)
> 21:41:39.409 (1)  FE=> Describe(portal=null)
> 21:41:39.409 (1)  FE=> Execute(portal=null,limit=0)
> 21:41:39.409 (1)  FE=> Sync
> 21:41:39.443 (1)  <=BE ParseComplete [S_1]
> 21:41:39.443 (1)  <=BE BindComplete [null]
> 21:41:39.443 (1)  <=BE CommandStatus(BEGIN)
> 21:41:39.443 (1)  <=BE ParseComplete [null]
> 21:41:39.443 (1)  <=BE BindComplete [null]
> 21:41:39.444 (1)  <=BE RowDescription(1)
> 21:41:39.444 (1)  <=BE DataRow
> 21:41:39.444 (1)  <=BE CommandStatus(SELECT)
> 21:41:39.454 (1)  <=BE ErrorMessage(ERROR: syntax error at or near 
> "SELECT"
>    Position: 9)
> 
> So this shows everything working as expected.  Perhaps enabling this 
> logging on your JDBC client would show more clearly what it is trying to 
> do.

Thanks for clarification. I will look into more between pgpool and
PostgreSQL packet exchange.
--
Tatsuo Ishii
SRA OSS, Inc. Japan


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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: exec_execute_message crush
Следующее
От: Boszormenyi Zoltan
Дата:
Сообщение: Re: [PATCH] Provide rowcount for utility SELECTs