all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* pg.el: pg:connect -> Backend error: FATAL unsupported frontend protocol 1.0: server supports 2.0 to 3.0
@ 2018-11-26  9:48 Martin Steffen
  2018-11-27 18:23 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Martin Steffen @ 2018-11-26  9:48 UTC (permalink / raw)
  To: help-gnu-emacs






Hi, 


I encountered a problem with postgres/pg.el after a recent upgrade of
the OS (fedora/postgres). It well might be that pg.el is not the
``culprit'' but I was not able to properly nail it down and I don't know
how to localize is.

On a very high level, the problem is: connecting to an existing data base
via pg.el yields the message

--------------------------
    pg:connect: Backend error: FATAL:  unsupported frontend protocol 1.0: server supports 2.0 to 3.0    
--------------------------


On the surface, the problem is kind of clear: somewhere/somehow, protocol
1.0 is no longer supported any more-


So far so good, the question is what to do about it (short of trying if one
get's hold of an outdated postgres version, which is a non-options).


What makes it puzzling for me are the following points:


     1) I can still access my postgres DB properly. that includes access
     ``via emacs'' in the sense of using sql-mode (sql.el) and functions like
       sql-postgres. 

        So, there's nothing wrong with the data-base, and some other
	emacs-modes are also willing to handle connection to my data
	base (but not pg.el)
    
     2) searching around on the internet I found some
        discussion/mentioning of the ``unsupported frontend protocol''
        phenomenon, but I could not find much information that seemed
        helpful for me.

	The longest discussion is a blog detailing reasons for the
	``unsupported-protocol-mystery'' (as the blog title reads):

        https://www.endpoint.com/blog/2015/05/28/postgres-unsupported-frontend-protocol
 

        Unfortunately, I was unable to turn that discussion into
        something that helps me to address my problem. Besides (if I
        interpret the analysis correct), the problem is poinpointed to
        nmap ``bingo, mystery solved. [...] most likely caused by
        someone running nmap in version detection mode.'' My machine did
        not have nmap running or even installed, so nmap is not the
        source of the problem on my machine.


I would he happy about any ideas where to dig (or even where to ask;
perhaps pg.el, is where it manifests itself for me, but it should be
tackled perhaps in some other package or component, but the question
would be where).

Thanks a lot, Martin




PS: for completeness sake: I use the very latest version of pg.el
"0.13+" resp "0.12", both have the same reaction.  For emacs I use emacs
26.1)









^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pg.el: pg:connect -> Backend error: FATAL unsupported frontend protocol 1.0: server supports 2.0 to 3.0
  2018-11-26  9:48 pg.el: pg:connect -> Backend error: FATAL unsupported frontend protocol 1.0: server supports 2.0 to 3.0 Martin Steffen
@ 2018-11-27 18:23 ` Stefan Monnier
  2018-11-28  2:48 ` Jean Louis
       [not found] ` <mailman.4740.1543343005.1284.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2018-11-27 18:23 UTC (permalink / raw)
  To: help-gnu-emacs

> PS: for completeness sake: I use the very latest version of pg.el
> "0.13+" resp "0.12", both have the same reaction.  For emacs I use emacs
> 26.1)

I can't find pg.el.  Could you include a link to it?


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pg.el: pg:connect -> Backend error: FATAL unsupported frontend protocol 1.0: server supports 2.0 to 3.0
  2018-11-26  9:48 pg.el: pg:connect -> Backend error: FATAL unsupported frontend protocol 1.0: server supports 2.0 to 3.0 Martin Steffen
  2018-11-27 18:23 ` Stefan Monnier
@ 2018-11-28  2:48 ` Jean Louis
       [not found] ` <mailman.4740.1543343005.1284.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 5+ messages in thread
From: Jean Louis @ 2018-11-28  2:48 UTC (permalink / raw)
  To: Martin Steffen; +Cc: help-gnu-emacs

On Mon, Nov 26, 2018 at 10:48:27AM +0100, Martin Steffen wrote:
> I encountered a problem with postgres/pg.el after a recent upgrade of
> the OS (fedora/postgres). It well might be that pg.el is not the
> ``culprit'' but I was not able to properly nail it down and I don't know
> how to localize is.
> 
> On a very high level, the problem is: connecting to an existing data base
> via pg.el yields the message
> 
> --------------------------
>     pg:connect: Backend error: FATAL:  unsupported frontend protocol 1.0: server supports 2.0 to 3.0    

Hello Martin,

I cannot say that this may help you. But I do
remember I had similar problem.

I am user of PostgreSQL who often installs it
myself, not by distribution and I sometimes
install one version more than what distribution
offers me.

So before months I have encountered the same
problem.

Read more about it here:
https://github.com/anse1/emacs-libpq/issues/7

Thus in the version 10 or 10.1 the protocol 1.0
has been dropped. So pg.el does not work any more,
unless somebody updates it.

My solution was to install that same module libpq
which does the work just well since 10 months
without problems.

https://github.com/anse1/emacs-libpq

Packages depending on pg.el may not work. But they
can be easily updated or modified.

I guess that the more users start using new
version of PostgreSQL there will be more reports
on how pg.el does not work any more.

Jean Louis



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pg.el: pg:connect -> Backend error: FATAL unsupported frontend protocol 1.0: server supports 2.0 to 3.0
       [not found] ` <mailman.4740.1543343005.1284.help-gnu-emacs@gnu.org>
@ 2018-11-28  5:58   ` martin.sputnik
  2018-11-30 15:51     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: martin.sputnik @ 2018-11-28  5:58 UTC (permalink / raw)
  To: help-gnu-emacs

On Tuesday, November 27, 2018 at 7:23:27 PM UTC+1, Stefan Monnier wrote:
> > PS: for completeness sake: I use the very latest version of pg.el
> > "0.13+" resp "0.12", both have the same reaction.  For emacs I use emacs
> > 26.1)
> 
> I can't find pg.el.  Could you include a link to it?
> 
> 
>         Stefan

I use a clone from

https://github.com/cbbrowne/pg.el



I use pg.el a number of years now, mostly the previous pg.el version 0.12 (which is not much different from the one with that link and shows the same ``unsupported-protocol'' behavior). Martin


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pg.el: pg:connect -> Backend error: FATAL unsupported frontend protocol 1.0: server supports 2.0 to 3.0
  2018-11-28  5:58   ` martin.sputnik
@ 2018-11-30 15:51     ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2018-11-30 15:51 UTC (permalink / raw)
  To: help-gnu-emacs

> I use a clone from
> https://github.com/cbbrowne/pg.el

Thanks.  Looks like this is an old package which has not been updated to
the new protocol versions, so indeed it can't be used to access more
recent postgres servers.

Could someone work on making it use protocol version 3.0?


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-30 15:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-26  9:48 pg.el: pg:connect -> Backend error: FATAL unsupported frontend protocol 1.0: server supports 2.0 to 3.0 Martin Steffen
2018-11-27 18:23 ` Stefan Monnier
2018-11-28  2:48 ` Jean Louis
     [not found] ` <mailman.4740.1543343005.1284.help-gnu-emacs@gnu.org>
2018-11-28  5:58   ` martin.sputnik
2018-11-30 15:51     ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.