From: Mason S. <mas...@en...> - 2010-12-03 17:19:35
|
Sent from my IPhone On Dec 3, 2010, at 5:31 PM, "Andrei.Martsinchyk" <and...@en...> wrote: > Mason, > > 2010/12/3 Mason Sharp <mas...@en...>: >> On 12/1/10 1:53 PM, Andrei.Martsinchyk wrote: >>> >>> Hi Benny, >>> >>> Thanks for pointing this out. I tested with a program using Postgres C >>> library and extended query protocol. >>> For you and anyone else who want to test I am attaching the test >>> program and simple Makefile. >>> I fixed the segmentation fault (updated patch is attached), but >>> anyway, PREPARE / EXECUTE commands do not work properly. >>> >> >> It looks like it is still not quite right: >> >> >> mds1=# create table mytab (col1 int, col2 int); >> CREATE TABLE >> mds1=# prepare p (int, int) AS INSERT INTO mytab VALUES ($1, $2); >> PREPARE >> mds1=# execute p (1,2); >> INSERT 0 1 >> mds1=# select * from mytab; >> col1 | col2 >> ------+------ >> (0 rows) >> >> It does not find the row that should have been inserted. >> > > Yes, I mentioned the PREPARE command does not work properly. > In this particular case it is inserting row into Coordinator database > and not visible for select. > Oh. So, only SELECT is currently handled? >> Also, one other question- the session seems to retain the fact that there >> are associated prepared statements. Does that mean that the pooler will not >> put these back in the pool until all are deallocated? >> > > Coordinator does not prepare statements on datanodes, so connection > can be released at the transaction end. It converts it into a simple statement? I think we need to support prepare and execute on the data nodes for performance. > >> On a related note, for the WITH HOLD cursors you implemented, did you also >> do something to hold on to the connections? >> > > I did not implement WITH HOLD. Let me retest this, and look at old emails later when back at my laptop. Mason > >> Thanks, >> >> Mason >> >> >> >> >> Mason Sharp >> EnterpriseDB Corporation >> The Enterprise Postgres Company >> >> >> This e-mail message (and any attachment) is intended for the use of >> the individual or entity to whom it is addressed. This message >> contains information from EnterpriseDB Corporation that may be >> privileged, confidential, or exempt from disclosure under applicable >> law. If you are not the intended recipient or authorized to receive >> this for the intended recipient, any use, dissemination, distribution, >> retention, archiving, or copying of this communication is strictly >> prohibited. If you have received this e-mail in error, please notify >> the sender immediately by reply e-mail and delete this message. >> >> > > > > -- > Andrei Martsinchyk > > EntepriseDB Corporation > The Enterprise Postgres Company > > Website: www.enterprisedb.com > EnterpriseDB Blog: http://blogs.enterprisedb.com/ > Follow us on Twitter: http://www.twitter.com/enterprisedb > > This e-mail message (and any attachment) is intended for the use of > the individual or entity to whom it is addressed. This message > contains information from EnterpriseDB Corporation that may be > privileged, confidential, or exempt from disclosure under applicable > law. If you are not the intended recipient or authorized to receive > this for the intended recipient, any use, dissemination, distribution, > retention, archiving, or copying of this communication is strictly > prohibited. If you have received this e-mail in error, please notify > the sender immediately by reply e-mail and delete this message. |