mcfunley / mcfunley/pgproxy

PostgreSQL version mismatch?

Open
#2 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
28
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Hi!

I just tried to use this, but I get the following with PostgreSQL 8.4.2. Also Python 2.6 doesn't have struct._compile anymore, it uses an internal cache.

  File "/Users/fschulze/Zope/jarn/bestform/bestform/buildout/src/pgproxy/pgproxy/protocol.py", line 57, in dataReceived
    done, extra = m.consume(data)
  File "/Users/fschulze/Zope/jarn/bestform/bestform/buildout/src/pgproxy/pgproxy/messages.py", line 52, in consume
    if not self.parse_header():
  File "/Users/fschulze/Zope/jarn/bestform/bestform/buildout/src/pgproxy/pgproxy/messages.py", line 100, in parse_header
    if not self.parse_special_header():
  File "/Users/fschulze/Zope/jarn/bestform/bestform/buildout/src/pgproxy/pgproxy/messages.py", line 193, in parse_special_header
    self.raise_unknown()
  File "/Users/fschulze/Zope/jarn/bestform/bestform/buildout/src/pgproxy/pgproxy/messages.py", line 119, in raise_unknown
    self.buffer.raw_value()[:200]))
exceptions.ValueError: Unknown FrontendMessage packet: '\x00\x00\x00\x08\x04\xd2\x16/'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pgproxy/protocol.py at dataReceived and pgproxy/messages.py at consume, parse_header, and parse_special_header. Reproduce the reported failure with PostgreSQL 8.4.2 and Python 2.6, then inspect the parsing and struct-related behavior. Done means the proxy handles the reported PostgreSQL message without raising Unknown FrontendMessage packet.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.