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