Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PostgreSQL 8.1 won't start[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ArsDangor
Guru
Guru


Joined: 20 May 2003
Posts: 477

PostPosted: Thu Nov 10, 2005 11:56 pm    Post subject: PostgreSQL 8.1 won't start[SOLVED] Reply with quote

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
View user's profile Send private message
Kurt Steiner
Bodhisattva
Bodhisattva


Joined: 01 Apr 2005
Posts: 1050
Location: Ostroleka, Polska

PostPosted: Fri Nov 11, 2005 2:57 pm    Post subject: Reply with quote

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.
 *
:wink:
Back to top
View user's profile Send private message
ArsDangor
Guru
Guru


Joined: 20 May 2003
Posts: 477

PostPosted: Fri Nov 11, 2005 8:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Sun Nov 13, 2005 12:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
ArsDangor
Guru
Guru


Joined: 20 May 2003
Posts: 477

PostPosted: Sun Nov 13, 2005 1:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Sun Nov 13, 2005 4:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
ArsDangor
Guru
Guru


Joined: 20 May 2003
Posts: 477

PostPosted: Sun Nov 13, 2005 5:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
pijalu
Guru
Guru


Joined: 04 Oct 2004
Posts: 365

PostPosted: Sun Nov 13, 2005 6:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
ArsDangor
Guru
Guru


Joined: 20 May 2003
Posts: 477

PostPosted: Sun Nov 13, 2005 9:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Nov 13, 2005 10:29 pm    Post subject: Reply with quote

ArsDangor wrote:
Softening my CFLAGS did the trick. :)

From what to what? Sounds like the ebuild should filter those errant CFLAGS out :wink:
Back to top
View user's profile Send private message
ArsDangor
Guru
Guru


Joined: 20 May 2003
Posts: 477

PostPosted: Sun Nov 13, 2005 10:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Nov 14, 2005 1:30 am    Post subject: Reply with quote

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
View user's profile Send private message
ArsDangor
Guru
Guru


Joined: 20 May 2003
Posts: 477

PostPosted: Mon Nov 14, 2005 1:43 am    Post subject: Reply with quote

-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
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Nov 14, 2005 2:21 am    Post subject: Reply with quote

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
View user's profile Send private message
ArsDangor
Guru
Guru


Joined: 20 May 2003
Posts: 477

PostPosted: Mon Nov 14, 2005 5:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum