Re: Odd response from server

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rui Pacheco <rui(dot)pacheco(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Odd response from server
Date: 2017-02-19 00:26:23
Message-ID: 32318.1487463983@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rui Pacheco <rui(dot)pacheco(at)gmail(dot)com> writes:
> I’m trying to send a Parse message with the name “my_name” and the statement “select * from departments” and no type id’s, along with a flush message:
> 'P','\0','\0','\0','(','m','y','_','n','a','m','e','\0','s','e','l','e','c','t',' ','*',' ','f','r','o','m',' ','d','e','p','a','r','t','m','e','n','t','s','\0','\0','\0','\0','\0','\0','H','\0','\0','\0','\x04’

> I get the ParseComplete response AND a FATAL error:

> '1','\0','\0','\0','\x04','E','\0','\0','\0','T','S','F','A','T','A','L','\0','C','0','8','P','0','1','\0','M','i','n','v','a','l','i','d',' ','f','r','o','n','t','e','n','d',' ','m','e','s','s','a','g','e',' ','t','y','p','e',' ','0','\0','F','p','o','s','t','g','r','e','s','.','c','\0','L','4','8','4','\0','R','S','o','c','k','e','t','B','a','c','k','e','n','d','\0','\0’

The server is seeing a valid Parse message and then some junk after it.
I think you're miscomputing the length of the Parse message, or maybe
emitting the wrong amount of data as part of the message, such that
the server isn't lined up to see the 'H' as the next byte after it's
consumed the Parse.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sachin Srivastava 2017-02-19 05:51:49 No space left on device
Previous Message Rui Pacheco 2017-02-18 23:54:42 Odd response from server