Re: [HACKERS] libpq and SPI

Поиск
Список
Период
Сортировка
От jwieck@debis.com (Jan Wieck)
Тема Re: [HACKERS] libpq and SPI
Дата
Msg-id m10MZqn-000EBxC@orion.SAPserv.Hamburg.dsh.de
обсуждение исходный текст
Ответ на Re: [HACKERS] libpq and SPI  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы developers globe  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
>
> > What is the problem? I'll research a SPI patch.
>
> Check the hackers thread (last month I think) titled "libpq and SPI";
> the problem occurs when one submits a utility statement rather than
> a plannable query via SPI.  Apparently what is happening is that the
> backend emits a 'T' message before it invokes the called statement
> and then emits a 'D' message afterwards --- so if the called statement
> causes a 'C' message to come out, libpq gets unhappy.  This seems
> to be clearly a violation of the FE/BE protocol to me, so I don't think
> it's libpq's fault.
>
> Reasonable fixes might be to postpone the sending of 'T' till after
> the invoked statement is executed, or to modify the traffic cop so
> that a utility statement invoked from SPI doesn't send 'C'.
>
> I know a little bit about the parts of the backend that communicate with
> the frontend, but nothing about SPI, so I'm not well prepared to solve
> the problem by myself.

    Another  major  problem  of  SPI  on utilities must get fixed
    prior.

    SPI  cannot  save  a  prepared  plan  for  utilities  because
    copyObject()  doesn't handle the utility part of Query. So it
    get's NULL and invoking such a  saved  plan  will  cause  the
    backend to crash.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Bug with sequences in 6.4.2
Следующее
От: reedstrm@wallace.ece.rice.edu (Ross J. Reedstrom)
Дата:
Сообщение: Re: [HACKERS] Re: [GENERAL] Bug with sequences in 6.4.2