View previous topic :: View next topic |
Author |
Message |
ArsDangor Guru
Joined: 20 May 2003 Posts: 477
|
Posted: Thu Nov 10, 2005 11:56 pm Post subject: PostgreSQL 8.1 won't start[SOLVED] |
|
|
Hi.
I've upgraded from PostgreSQL 8.0.4 to 8.1. And now, it doesn't start. I dumped and dropped all databases, updated PostgreSQL, and run emerge --config postgresql. This is what I get: Code: | # emerge --config postgresql
Configuring pkg...
* Creating the data directory ...
* Initializing the database ...
su: Authentication service cannot retrieve authentication info.
(Ignored)
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale es_ES@euro.
The default database encoding has accordingly been set to LATIN9.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating directory /var/lib/postgresql/data/global ... ok
creating directory /var/lib/postgresql/data/pg_xlog ... ok
creating directory /var/lib/postgresql/data/pg_xlog/archive_status ... ok
creating directory /var/lib/postgresql/data/pg_clog ... ok
creating directory /var/lib/postgresql/data/pg_subtrans ... ok
creating directory /var/lib/postgresql/data/pg_twophase ... ok
creating directory /var/lib/postgresql/data/pg_multixact/members ... ok
creating directory /var/lib/postgresql/data/pg_multixact/offsets ... ok
creating directory /var/lib/postgresql/data/base ... ok
creating directory /var/lib/postgresql/data/base/1 ... ok
creating directory /var/lib/postgresql/data/pg_tblspc ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 800
creating configuration files ... ok
creating template1 database in /var/lib/postgresql/data/base/1 ... FATAL: unrecognized configuration parameter "shared_buffers"
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
*
* You can use /etc/init.d/postgresql script to run PostgreSQL instead of pg_ctl.
* | And, as there's no data directory, I can't start postmaster.
Any ideas?
Thanks. _________________ Cómo usar Portage correctamente
Last edited by ArsDangor on Sun Nov 13, 2005 9:03 pm; edited 1 time in total |
|
Back to top |
|
|
Kurt Steiner Bodhisattva
Joined: 01 Apr 2005 Posts: 1050 Location: Ostroleka, Polska
|
Posted: Fri Nov 11, 2005 2:57 pm Post subject: |
|
|
And how do you try to start it?
As you posted: Code: | *
* You can use /etc/init.d/postgresql script to run PostgreSQL instead of pg_ctl.
* | |
|
Back to top |
|
|
ArsDangor Guru
Joined: 20 May 2003 Posts: 477
|
Posted: Fri Nov 11, 2005 8:52 pm Post subject: |
|
|
I've tried both ways: Code: | StarWars ~ # /etc/init.d/postgresql start
* Caching service dependencies ... [ ok ]
* Starting service postgresql
Please see log file: /var/lib/postgresql/data/postgresql.log [ !! ]
* FAILED to start service postgresql! | And it doesn't start. The log file claims there's no postgresql.conf, but it should have been created by emerge --config, or by initdb.
And if I su postgres: Code: | postgres@StarWars ~ $ pg_ctl start -D data
postmaster cannot access the server configuration file "/var/lib/postgresql/data/postgresql.conf": No such file or directory
postmaster starting | But it doesn't start: Code: | postgres@StarWars ~ $ ps -A|grep post
postgres@StarWars ~ $ |
_________________ Cómo usar Portage correctamente |
|
Back to top |
|
|
pijalu Guru
Joined: 04 Oct 2004 Posts: 365
|
Posted: Sun Nov 13, 2005 12:53 pm Post subject: |
|
|
Actually, pg 8.1.0 cannot use 8.0.x data files....
(I just open a bug report for 8.1.0 not checking this point.... https://bugs.gentoo.org/show_bug.cgi?id=112400)
So I hope you made a big nice dump before upgrade or you will have to downgrade / backup
then delete the /var/lib/postgresql directory then upgrade and restore your dump
This should fix problems |
|
Back to top |
|
|
ArsDangor Guru
Joined: 20 May 2003 Posts: 477
|
Posted: Sun Nov 13, 2005 1:23 pm Post subject: |
|
|
Yes, I did. I've removed /var/lib/postgresql. And I get the same output from emerge --config.
Thanks for your answer. _________________ Cómo usar Portage correctamente |
|
Back to top |
|
|
pijalu Guru
Joined: 04 Oct 2004 Posts: 365
|
Posted: Sun Nov 13, 2005 4:53 pm Post subject: |
|
|
ArsDangor wrote: | Yes, I did. I've removed /var/lib/postgresql. And I get the same output from emerge --config.
Thanks for your answer. |
So it didn't fix the issue :S
This is what i did for the upgrade (after the merge of 8.1) [ i don't use emerge --config]
Code: |
# rm -rf /var/lib/postgresql
# mkdir /var/lib/postgresql
# chown postgres:postgres /var/lib/postgresql
# su - postgre
$ initdb -D /var/lib/postgresql/data
...
$ exit
# /etc/init.d/postgresql restart
|
and as usual, before the restart, another console with
Code: |
# tail -f /var/lib/postgresql/data/postgresql.log
|
Hope this help |
|
Back to top |
|
|
ArsDangor Guru
Joined: 20 May 2003 Posts: 477
|
Posted: Sun Nov 13, 2005 5:59 pm Post subject: |
|
|
Still the same. What USEs did you set for PostgreSQL? I'll try to re-emerge it using those.
Thanks for your help. _________________ Cómo usar Portage correctamente |
|
Back to top |
|
|
pijalu Guru
Joined: 04 Oct 2004 Posts: 365
|
Posted: Sun Nov 13, 2005 6:33 pm Post subject: |
|
|
ArsDangor wrote: | Still the same. What USEs did you set for PostgreSQL? I'll try to re-emerge it using those.
Thanks for your help. |
hmm, strange, still same
Code: |
creating template1 database in /var/lib/postgresql/data/base/1 ... FATAL: unrecognized configuration parameter "shared_buffers"
| ?
FYI:
Code: |
[ebuild R ] dev-db/postgresql-8.1.0 -doc -kerberos +libg++ +nls +pam +perl -pg-intdatetime +python +readline (-selinux) +ssl +tcltk +xml2 +zlib 0 kB [1]
[ebuild R ] dev-db/libpq-8.1.0 -kerberos +nls +pam +readline +ssl +zlib 0 kB
|
my used CFLAGS
Code: |
CFLAGS="-O3 -march=pentium-m -fomit-frame-pointer -fforce-addr
-momit-leaf-frame-pointer -pipe -ftracer -mfpmath=sse"
CXXFLAGS="${CFLAGS}"
|
|
|
Back to top |
|
|
ArsDangor Guru
Joined: 20 May 2003 Posts: 477
|
Posted: Sun Nov 13, 2005 9:02 pm Post subject: |
|
|
Softening my CFLAGS did the trick.
I'm restoring my databases right now. Thank you so much. _________________ Cómo usar Portage correctamente |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Sun Nov 13, 2005 10:29 pm Post subject: |
|
|
ArsDangor wrote: | Softening my CFLAGS did the trick. |
From what to what? Sounds like the ebuild should filter those errant CFLAGS out |
|
Back to top |
|
|
ArsDangor Guru
Joined: 20 May 2003 Posts: 477
|
Posted: Sun Nov 13, 2005 10:39 pm Post subject: |
|
|
The original CFLAGS (on make.conf): Code: | CFLAGS="-O3 -march=athlon-xp -pipe -mmmx -m3dnow -ffast-math -fomit-frame-pointer -msse -mfpmath=sse,387 -maccumulate-outgoing-args -fprefetch-loop-arrays -momit-leaf-frame-pointer" |
And the working ones: Code: | CFLAGS='-march=athlon-xp -O3 -pipe -mmmx -msse -fomit-frame-pointer -m3dnow -mfpmath=sse,387 -momit-leaf-frame-pointer' |
_________________ Cómo usar Portage correctamente |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Mon Nov 14, 2005 1:30 am Post subject: |
|
|
ArsDangor wrote: | -ffast-math |
Where in the gcc docs does it say that this is a safe setting? What I see from "man gcc" is: Quote: |
This option should never be turned on by any -O option since it can result in incorrect output for programs which depend on an exact implementation of IEEE or ISO rules/specifications for math functions. |
|
|
Back to top |
|
|
ArsDangor Guru
Joined: 20 May 2003 Posts: 477
|
Posted: Mon Nov 14, 2005 1:43 am Post subject: |
|
|
-ffast-math is supposed not to be safe on applications which depend on high precision for numerical calculations. I thought PostgreSQL wouldn't be the case.
I have compiled media players (which need floating point operations), KDE, and previous versions of PostgreSQL using this flag. And they have always behaved correctly.
I tested PostgreSQL 7.3, 7.4 and 8.0 with this flag set. It's not such a nonsense to try it on 8.1. And, if I had any wrong-code, any wrong results... I'd expect to see them on mathematical calculations, or the program showing me some random results (weird output, the program segfaulting...). Not on a neat exit on something that doesn't look math-intensive. _________________ Cómo usar Portage correctamente |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Mon Nov 14, 2005 2:21 am Post subject: |
|
|
ArsDangor wrote: | I tested PostgreSQL 7.3, 7.4 and 8.0 with this flag set. It's not such a nonsense to try it on 8.1. And, if I had any wrong-code, any wrong results... I'd expect to see them on mathematical calculations, or the program showing me some random results (weird output, the program segfaulting...). Not on a neat exit on something that doesn't look math-intensive. |
Why are you running these stupid CFLAGS without at least warning us in advance? As you can see, it created a completely useless bug thread. |
|
Back to top |
|
|
ArsDangor Guru
Joined: 20 May 2003 Posts: 477
|
Posted: Mon Nov 14, 2005 5:32 pm Post subject: |
|
|
PaulBredbury wrote: | Why are you running these stupid CFLAGS without at least warning us in advance? As you can see, it created a completely useless bug thread. | Bug thread? I created a help thread. And the one who helped was pijalu. If he has anything to complain of, I'll apoligize to him. Not to you. You were not much of help. _________________ Cómo usar Portage correctamente |
|
Back to top |
|
|
|