Home > Archive > PostgreSQL Discussion > September 2005 > wrong protocol sequence?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author wrong protocol sequence?
Андрей

2005-09-22, 9:23 am

Hello!

I'm sending such messages to server in native postgresql protocol:
'Parse' -> 'Describe' -> 'Sync' (get: 'Parse Complete' and 'Ready For
Query' messages back).
But when the sequence became: 'Parse' -> 'Sync' (get: 'Parse Complete'
and 'Ready For Query' messages back), little pause, 'Describe' -> 'Sync'
- server is crashing (error = memory can't be 'read')!

My query is as simple as possible 'select * from table_name'. What am I
doing wrong?

Big Thanks,
Andrei



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

John DeSoi

2005-09-22, 11:23 am


On Sep 22, 2005, at 10:11 AM, Андрей wrote:

> I'm sending such messages to server in native postgresql
> protocol: 'Parse' -> 'Describe' -> 'Sync' (get: 'Parse Complete'
> and 'Ready For Query' messages back).
> But when the sequence became: 'Parse' -> 'Sync' (get: 'Parse
> Complete' and 'Ready For Query' messages back), little pause,
> 'Describe' -> 'Sync' - server is crashing (error = memory can't be
> 'read')!
>
> My query is as simple as possible 'select * from table_name'.
> What am I doing wrong?




I think I recall having some problems around this also. But I don't
think there is any reason to need Parse -> Sync anyway. If you just
want to prepare, use Parse -> Describe -> Sync. For executing, Parse
(if not already parsed) -> Bind -> Describe -> Execute -> Sync.




John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Tom Lane

2005-09-22, 11:24 am

=?UTF-8?B?0JDQvdC00YDQtdC5?= <andyk@softwarium.net> writes:
> I'm sending such messages to server in native postgresql protocol:
> 'Parse' -> 'Describe' -> 'Sync' (get: 'Parse Complete' and 'Ready For
> Query' messages back).
> But when the sequence became: 'Parse' -> 'Sync' (get: 'Parse Complete'
> and 'Ready For Query' messages back), little pause, 'Describe' -> 'Sync'
> - server is crashing (error = memory can't be 'read')!


Please send a complete test case to pgsql-bugs, and we'll take a look.

It sounds to me like your program is sending invalid data, so you'll
want to fix that --- but the server really shouldn't dump core.

Also, what PG version are you working with?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com