Unix Technical Forum

save history error, ignorable?

This is a discussion on save history error, ignorable? within the Pgsql General forums, part of the PostgreSQL category; --> I just upgraded from postgres 7.x.x to 8.1.0 and am getting the following error from cmd-line psql: could not ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-09-2008, 06:57 AM
Scott Frankel
 
Posts: n/a
Default save history error, ignorable?


I just upgraded from postgres 7.x.x to 8.1.0 and am getting the
following error from cmd-line psql:

could not save history to file "<my_home_dir>/.psql_history":
Invalid argument

Searching the archives, I found a thread about this error wherein the
poster "solved" the problem by commenting out the reporting code in
the source file. Tom's reply (*) suggests a discrepancy in libraries
on MacOSX. Nonetheless, I *seem* to have the intended functionality
(readline history on the cmd-line), in spite of the error msg.

Questions:

- Is the error msg ignorable?

- Else, is there a post-compile fix for the problem?

- Does the correct lib exist on MacOSX? If so, is there doco on how
to specify its use on compiling?

My platform:

MacOSX v10.4.2
PostgreSQL v8.1.0

Thanks in advance!
Scott


(*) [ from Tom Lane, via archives search ]
The Postgres code in that area hasn't changed at all. Maybe in this
build you linked against Apple's builtin libedit instead of libreadline?
libedit seems to have a bizarre definition of the result value from
write_history()



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-09-2008, 06:57 AM
Tom Lane
 
Posts: n/a
Default Re: save history error, ignorable?

Scott Frankel <leknarf@pacbell.net> writes:
> [ Mac OS X ]
> could not save history to file "<my_home_dir>/.psql_history":
> Invalid argument


> Searching the archives, I found a thread about this error wherein the
> poster "solved" the problem by commenting out the reporting code in
> the source file.


If you look back further, there is more discussion of this several
months back. It seems that libedit and libreadline are not compatible
about how write_history() reports errors. We haven't figured out a
nice solution for this yet.

> - Is the error msg ignorable?


Pretty much.

> - Does the correct lib exist on MacOSX?


You can grab libreadline and install it into /usr/local, or use the
version from Fink.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-09-2008, 06:57 AM
Scott Frankel
 
Posts: n/a
Default Re: save history error, ignorable?


OK. Thanks!
Scott


On Nov 10, 2005, at 10:20 AM, Tom Lane wrote:

> Scott Frankel <leknarf@pacbell.net> writes:
>
>> [ Mac OS X ]
>> could not save history to file "<my_home_dir>/.psql_history":
>> Invalid argument
>>

>
>
>> Searching the archives, I found a thread about this error wherein the
>> poster "solved" the problem by commenting out the reporting code in
>> the source file.
>>

>
> If you look back further, there is more discussion of this several
> months back. It seems that libedit and libreadline are not compatible
> about how write_history() reports errors. We haven't figured out a
> nice solution for this yet.
>
>
>> - Is the error msg ignorable?
>>

>
> Pretty much.
>
>
>> - Does the correct lib exist on MacOSX?
>>

>
> You can grab libreadline and install it into /usr/local, or use the
> version from Fink.
>
> regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:39 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com