unsupported frontend protocol
I've painted myself into a little corner here:
I pg_dumped a 7.4.3 database, created a database of the same name on a
7.3.4 server, psql'd into the new database, and \i'd the dump file.
The database was created although there were a variety of errors which I
realized were due to 7.4.3 and 7.3.4 SQL incompatibilities. I had also
added a new entry to pg_hba.conf. After restarting the 7.3.4 postmaster
I started getting an endless series of "FATAL: unsupported frontend
protocol" messages, even when not using psql. The only other access to
the cluster is by PHP 4.2.2, and nothing accesses the newly restored
database.
Since the db had errors anyway, I restored the old pg_hba.conf file,
dropped the new database, and restarted the postmaster -- i.e.
attempting to wipe out all changes. HOWEVER, the protocol error message
persists, endlessly and infuriatingly! Searching on the error message
text doesn't return anything enlightening.
Can anyone suggest why this is happening or where I find a log with
further details. Thank you in advance
John Gunther
Bucks vs Bytes Inc <postgresql@bucksvsbytes.com> writes:
The database was created although there were a variety of errors which I
realized were due to 7.4.3 and 7.3.4 SQL incompatibilities. I had also
added a new entry to pg_hba.conf. After restarting the 7.3.4 postmaster
I started getting an endless series of "FATAL: unsupported frontend
protocol" messages, even when not using psql.
Not surprising if you are using 7.4 or later client libraries. Those
will try to connect using the PG V3 protocol (added in 7.4). libpq, at
least, will fall back to the older protocol if V3 doesn't work, but
I am not sure whether PHP uses libpq.
regards, tom lane
Agreed that the symptom fits a client library mismatch, but the only
thing I moved from the 7.4.3 system to the 7.3.4 system was a pg_dump'ed
database. That can't carry anything that would affect the interaction
between the existing PHP 4.2.2 and PostgreSQL 7.3.4 versions, can it?
They worked without error for many months prior to that database load.
Is there any postmaster logging I can turn on that will detail what's
triggering the error?
John
Tom Lane wrote:
Show quoted text
Not surprising if you are using 7.4 or later client libraries. Those
will try to connect using the PG V3 protocol (added in 7.4). libpq, at
least, will fall back to the older protocol if V3 doesn't work, but
I am not sure whether PHP uses libpq.regards, tom lane
Bucks vs Bytes Inc <postgresql@bucksvsbytes.com> writes:
Is there any postmaster logging I can turn on that will detail what's
triggering the error?
Well, you could change the error report in postmaster.c to show the
specific protocol version code it's receiving (7.4 and up do this,
but it hadn't occurred to us as of 7.3). I have little doubt what
you will find though. Maybe what you really want is to enable
log_connections so you can find out where the problematic connections
are coming from.
regards, tom lane
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Connection logging shows an unvarying pattern: every connection
attempt, regardless of target database or source (PHP or psql), first
uses a wrong protocol and then succeeds on a second attempt, presumably
after falling back:<br>
<br>
LOG: connection received: host=[local]<br>
FATAL: unsupported frontend protocol<br>
LOG: connection received: host=[local]<br>
LOG: connection authorized: user=testuser database=test<br>
<br>
Any thoughts on what could make both clients attempt wrong protocol?<br>
<br>
/usr/lib has the following libpq files:<br>
-rw-r--r-- 1 root root 592784 Jun 24 2004 /usr/lib/libpq.a<br>
lrwxrwxrwx 1 root root 12 Jul 8 2004
/usr/lib/libpq.so -> libpq.so.3.1<br>
lrwxrwxrwx 1 root root 12 Nov 28 2003
/usr/lib/libpq.so.2 -> libpq.so.2.2<br>
-rwxr-xr-x 1 root root 61252 Nov 4 2003
/usr/lib/libpq.so.2.2<br>
lrwxrwxrwx 1 root root 12 Jul 8 2004
/usr/lib/libpq.so.3 -> libpq.so.3.1<br>
-rwxr-xr-x 1 root root 112040 Jun 24 2004
/usr/lib/libpq.so.3.1<br>
<br>
<br>
Tom Lane wrote:
<blockquote cite="mid14750.1117071655@sss.pgh.pa.us" type="cite">
<pre wrap="">Bucks vs Bytes Inc <a class="moz-txt-link-rfc2396E" href="mailto:postgresql@bucksvsbytes.com"><postgresql@bucksvsbytes.com></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">Is there any postmaster logging I can turn on that will detail what's
triggering the error?
</pre>
</blockquote>
<pre wrap=""><!---->
Well, you could change the error report in postmaster.c to show the
specific protocol version code it's receiving (7.4 and up do this,
but it hadn't occurred to us as of 7.3). I have little doubt what
you will find though. Maybe what you really want is to enable
log_connections so you can find out where the problematic connections
are coming from.
regards, tom lane
</pre>
</blockquote>
</body>
</html>