8.0 Beta-5 Linux PSQL Endless loop -- Followup

Started by Michael Owensover 21 years ago4 messagesbugs
Jump to latest
#1Michael Owens
mikeowens@gmail.com

This problem seems to be related to the .psql_history file. If I
delete the file, the problem does not occur and psql starts up fine.
However, when I run psql again (after the previous session had
generated a .psql_history file), the problem occurs. strace shows
something like

read(4, "", 131072) = 0
.
.
(hundreds)
.
.
brk(0) = 0x39f8d000
brk(0x39fae000) = 0x39fae000
read(4, "", 131072) = 0
.
.
(hundreds)
.
.

So it seems to be something related to reading the .psql_history file.

-- Mike

#2Neil Conway
neilc@samurai.com
In reply to: Michael Owens (#1)
Re: 8.0 Beta-5 Linux PSQL Endless loop -- Followup

On Mon, 2004-11-29 at 17:10 -0600, Michael Owens wrote:

This problem seems to be related to the .psql_history file. If I
delete the file, the problem does not occur and psql starts up fine.
However, when I run psql again (after the previous session had
generated a .psql_history file), the problem occurs.

Reading from .psql_history is implemented via libreadline, so I suspect
something is awry with your readline install. What version of readline
are you using?

-Neil

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Owens (#1)
Re: 8.0 Beta-5 Linux PSQL Endless loop -- Followup

Michael Owens <mikeowens@gmail.com> writes:

... So it seems to be something related to reading the .psql_history file.

psql itself doesn't even know that .psql_history exists; that file is
only touched by the readline library (or possibly libedit, if you are
using that instead of readline; not likely since you are on Linux but
I mention it for completeness).

In short: seems like there's something wrong with your libreadline
installation. What version of that are you using?

regards, tom lane

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Owens (#1)
Re: 8.0 Beta-5 Linux PSQL Endless loop -- Followup

Michael Owens <mikeowens@gmail.com> writes:

Yeah, that was it. I started to look into that after you last email
and discovered that I had libedit installed. I was tinkering around
with it a few weeks back. I just unmerged libedit and got it off my
system. As soon as I tried to shutdown PG, pg_ctl complained about the
missing libedit library. I rebuilt PG, which this time did not use
libedit, rather readline, and it worked fine.

Interesting. Either your libedit installation was broken (not entirely
unlikely on Gentoo, which is way too bleeding-edge for my tastes ;-))
or there is some bit-rot in our support for libedit. The latter seems
possible since AFAIK the vast majority of PG users use readline.

Can any libedit users confirm it still works with PG current??

regards, tom lane