dbTalk Databases Forums  

[BUGS] Possible bug in conversion_create.sql

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Possible bug in conversion_create.sql in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
 
Posts: n/a

Default [BUGS] Possible bug in conversion_create.sql - 11-03-2003 , 08:10 AM






Hello,

I had a problem with PostgreSQL 7.3.4, the pg_conversion table was empty after
initdb, so, no conversion could be made. I did exactly this:
# tar xvzf postgres-7.3.4.tar.gz
# cd postgres-7.3.4
# ./configure --prefix=/var/lib/pgsql --with-java --with-openssl
--without-readline
# make
# make install
Created the postgres user and group and did chown postgresostgres
/var/lib/pgsql -R
# su - postgres
postgres$ initdb --pgdata /var/lib/pgsql/data
postgres$ exit
Runned /etc/init.d/postgres start, that have the following command:
# su - $PG_USER -c "$PG_BASE/bin/pg_ctl start -D '$PG_DATA' -s -l '$PG_LOGFILE'
-o '-N 1024 -B 2048 -i'"
Where: PG_USER=postgres, PG_BASE=/var/lib/pgsql, PG_DATA=/var/lib/pgsql/data
and PG_LOGFILE=/var/lib/pgsql/data/postgres.log

Until here everything looked fine, but then JDBC tried on a database created
with LATIN1 encoding:
set client_encoding='UNICODE';
And got back: Conversion between LATIN1 and UNICODE is not supported

With the help of two people from #postgresql at irc.freenode.org, I did a
initdb -d --pgdata data 2>debug.log and founded out that the problem was that
conversion_create.sql wasn't changing $libdir to the actual name
(/var/lib/pgsql/lib in my case). I did a sed on it and runned initdb, this time
everything runned fine.

I hope this help this great database,

Thanks,

Silvio Fonseca
Linux Consultant



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Possible bug in conversion_create.sql - 11-03-2003 , 09:40 AM






"" <silvio (AT) relato (DOT) com.br> writes:
Quote:
With the help of two people from #postgresql at irc.freenode.org, I did a
initdb -d --pgdata data 2>debug.log and founded out that the problem was that
conversion_create.sql wasn't changing $libdir to the actual name
It's not supposed to. I don't know what problem you had, but this is
the wrong fix.

regards, tom lane

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


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Possible bug in conversion_create.sql - 11-04-2003 , 10:02 AM



"" <silvio (AT) relato (DOT) com.br> writes:
Quote:
It's not supposed to. I don't know what problem you had, but this is
the wrong fix.

But the problem was solved with the change. I'm not a postgres master
at all, so, how postgres knows what to use on the libdir variable?
Where the variable is defined? How I know if this is set?
$libdir is expanded on-the-fly when the dynamic function loader needs to
find the file. The value that is used for it can be found from
pg_config --pkglibdir

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #4  
Old   
 
Posts: n/a

Default Re: [BUGS] Possible bug in conversion_create.sql - 11-04-2003 , 03:20 PM



Quote:
With the help of two people from #postgresql at irc.freenode.org, I did a
initdb -d --pgdata data 2>debug.log and founded out that the problem was
that conversion_create.sql wasn't changing $libdir to the actual name

It's not supposed to. I don't know what problem you had, but this is
the wrong fix.
I'm sure that sed isn't the correct procedure :-) Somewhere in the way (in the
instalation or in runtime), postgres should change libdir to the actual dir
name, since the error was "no such file or directory"...

But the problem was solved with the change. I'm not a postgres master at all,
so, how postgres knows what to use on the libdir variable? Where the variable
is defined? How I know if this is set?

Thanks for any anwer :-)

Silvio Fonseca
Linux Consultant


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


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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.