Re: How to debug the wire protocol?

From: Rui Pacheco <rui(dot)pacheco(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to debug the wire protocol?
Date: 2017-02-09 19:12:03
Message-ID: 678D8F88-A93D-4CDE-8810-B88454ABD7E9@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Not sure this solves my problem. I’d like to debug how the server is failing to parse my message, not what it looks like on the wire. I am the one forming the message after all.

My apologies if I missed something.

> On 9 Feb 2017, at 20:05, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>
> Hi
>
> 2017-02-09 20:01 GMT+01:00 Rui Pacheco <rui(dot)pacheco(at)gmail(dot)com <mailto:rui(dot)pacheco(at)gmail(dot)com>>:
> Hello,
>
> I’ve sent a similar email to the general mailing list but got no reply.
>
> I’m trying to write my own implementation of the wire protocol. I’m stuck at the Parse message where I send it to the server but always get the following error: “Could not parse statement invalid string in message”
>
> Is there a way to see how Postgres parses the message? I’ve set logging to DEBUG5 but the only thing I can see in the logs is, among other things, the message
>
> ERROR: invalid string in message
> FATAL: invalid frontend message type 63
>
> What is exactly wrong? Is there a way to log the parsing of the message, or should I create my own build of postgres with log statements where I need them?
>
> https://github.com/dalibo/pgshark <https://github.com/dalibo/pgshark>
>
> Regards
>
> Pavel
>
> Many thanks,
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org <mailto:pgsql-hackers(at)postgresql(dot)org>)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers <http://www.postgresql.org/mailpref/pgsql-hackers>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2017-02-09 19:14:07 Re: [PATCH] Rename pg_switch_xlog to pg_switch_wal
Previous Message Tom Lane 2017-02-09 19:08:14 Re: [PATCH] Rename pg_switch_xlog to pg_switch_wal