FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 11-17-2011, 05:42 PM
Digimer
 
Default Can't start portgresql after F15 -> F16 upgrade

Hi all,

After upgrading from Fedora 15 to Fedora 16, something broke with
postgresql.

First, I can't tab-complete 'systemctl status postgres.service', but
that's relatively minor.

The real concern is that I can't start the service at all;

lework:tools# systemctl start postgresql.service
Job failed. See system logs and 'systemctl status' for details.

lework:tools# systemctl status postgresql.service
postgresql.service - PostgreSQL database server
Loaded: loaded (/lib/systemd/system/postgresql.service; disabled)
Active: failed since Thu, 17 Nov 2011 13:36:54 -0500; 3s ago
Process: 4757 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p
${PGPORT} -w -t 300 (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/postgresql.service

I tried uninstalling reinstalling all of the postgresql RPMs, but got
the same results.

--
Digimer
E-Mail: digimer@alteeve.com
Freenode handle: digimer
Papers and Projects: http://alteeve.com
Node Assassin: http://nodeassassin.org
"omg my singularity battery is dead again.
stupid hawking radiation." - epitron
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-17-2011, 05:52 PM
Digimer
 
Default Can't start portgresql after F15 -> F16 upgrade

On 11/17/2011 01:42 PM, Digimer wrote:
> Hi all,
>
> After upgrading from Fedora 15 to Fedora 16, something broke with
> postgresql.
>
> First, I can't tab-complete 'systemctl status postgres.service', but
> that's relatively minor.
>
> The real concern is that I can't start the service at all;
>
> lework:tools# systemctl start postgresql.service
> Job failed. See system logs and 'systemctl status' for details.
>
> lework:tools# systemctl status postgresql.service
> postgresql.service - PostgreSQL database server
> Loaded: loaded (/lib/systemd/system/postgresql.service; disabled)
> Active: failed since Thu, 17 Nov 2011 13:36:54 -0500; 3s ago
> Process: 4757 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p
> ${PGPORT} -w -t 300 (code=exited, status=1/FAILURE)
> CGroup: name=systemd:/system/postgresql.service
>
> I tried uninstalling reinstalling all of the postgresql RPMs, but got
> the same results.
>

I had to move my /var/lib/pgsql/data out of the way and re-initialize.

Two comments;

1. This should have generated a more useful error, like "data is from an
old version and is not compatible."

2. Once the data directory was moved, I had to manually (re)initialize
the database. There should be a mechanism for 'start' to realize the
server needs to be initialized and do so.

--
Digimer
E-Mail: digimer@alteeve.com
Freenode handle: digimer
Papers and Projects: http://alteeve.com
Node Assassin: http://nodeassassin.org
"omg my singularity battery is dead again.
stupid hawking radiation." - epitron
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-17-2011, 06:06 PM
Deron Meranda
 
Default Can't start portgresql after F15 -> F16 upgrade

Yes, it most likely has to do with upgrading the version of PostgreSQL
to 9.1, and any previously-existing databases not being
version-compatible. You can see the error messages if you...

grep pg_ctl /var/log/messages


If you didn't have any databases you need to keep, then just delete
the old data directory and re-initialize it.

# rm -fr /var/lib/pgsql/data/*

# su - postgres
$ pg_ctl init

--
Deron Meranda
http://deron.meranda.us/
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-17-2011, 06:06 PM
Reindl Harald
 
Default Can't start portgresql after F15 -> F16 upgrade

Am 17.11.2011 19:52, schrieb Digimer:
> 1. This should have generated a more useful error, like "data is from an
> old version and is not compatible."

i guess there are logs of postgresql
systemd can not know why the binary ends with non-zero code

> 2. Once the data directory was moved, I had to manually (re)initialize
> the database. There should be a mechanism for 'start' to realize the
> server needs to be initialized and do so.

not really

configuration and initialization is not the job of the init-system
the only problem is that old sysv-scirpts did many things which they
never should have done, if i install a service i should read the docs


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-17-2011, 06:08 PM
Michael Cronenworth
 
Default Can't start portgresql after F15 -> F16 upgrade

Digimer wrote:
> 1. This should have generated a more useful error, like "data is from an
> old version and is not compatible."

Systemd stdout doesn't handle this and probably never will. Check your
logs, as with any service issue.

> 2. Once the data directory was moved, I had to manually (re)initialize
> the database. There should be a mechanism for 'start' to realize the
> server needs to be initialized and do so.

I hope you realize that all your previous SQL data is in the old
/var/lib/pgsql/data directory.

PostgreSQL version upgrades have always had to be handled by data dumps
and data imports. With PostgreSQL 9.0 an upgrade utility was created,
but it is not run by default as it is not considered stable. It works
fine for me though. Perform a "yum install postgresql-upgrade" to
install the utility and run "pg_upgrade" as root.

I suggest that you study PostgreSQL administration. I don't have a
problem with how the current system works.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-17-2011, 06:12 PM
Lamar Owen
 
Default Can't start portgresql after F15 -> F16 upgrade

On Nov 17, 2011, at 1:52 PM, Digimer wrote:
1. This should have generated a more useful error, like "data is
from an

old version and is not compatible."



2. Once the data directory was moved, I had to manually (re)initialize
the database. There should be a mechanism for 'start' to realize the
server needs to be initialized and do so.


Oh, that's too funny.

It used to, years ago. I know; I maintained the community packages
from 1999 to 2004. The behavior was changed to require the separate
initdb parameter to the SysV init file rather than automatically. I
don't have the BZ number handy, but you shouldn't have too much
trouble locating it. If nothing else, look in the changelog for the
postgresql RPM ( use the command:

rpm -qi --changelog postgresql
) The changelog entry listing in question, incidentally, can be found
in the CentOS 6 RPM for postgresql, and is:

+++++++++
* Mon Dec 04 2006 Tom Lane <tgl@redhat.com> 8.2.0-1
- Update to PostgreSQL 8.2.0
- Update to PyGreSQL 3.8.1
- Fix chcon arguments in test/regress/Makefile
Related: #201035
- Adjust init script to not fool /etc/rc.d/rc
Resolves: #161470
- Change init script to not do initdb automatically, but require
manual "service postgresql initdb" for safety. Per upstream
discussions.


+++++++++++

So you'd want to look at the postgresql-hackers archive for this
discussion thread. (the postgresql-hackers list is available on www.postgresql.org
).


The current behavior is covered in the release notes; for Fedora 16 see:
http://docs.fedoraproject.org/en-US/Fedora/16/html/Release_Notes/sect-Release_Notes-Changes_for_Sysadmin.html#id1410272

And for Fedora 15 see:
http://docs.fedoraproject.org/en-US/Fedora/15/html/Release_Notes/sect-Release_Notes-Changes_for_SysAdmin.html#sect-RelNotes-Database_Servers

However, the release notes do not mention the version upgrade from
PostgreSQL 9.0.3 to PostgreSQL 9.1.1; they should have.


As a general rule, special things are required to be done between
major version releases of postgresql; a 9.1 server will not start
against a 9.0 database. It has been this way for a very long time.
That's why I linked to the F15 release notes, because the way to
migrate from 9.0 to 9.1 should be pretty similar to the way the
upgrade from 8.4 to 9.0 was handled, and that is in the F15 release
notes.--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-17-2011, 06:13 PM
Deron Meranda
 
Default Can't start portgresql after F15 -> F16 upgrade

On Thu, Nov 17, 2011 at 2:08 PM, Michael Cronenworth <mike@cchtml.com> wrote:
> Digimer wrote:
>> 1. This should have generated a more useful error, like "data is from an
>> old version and is not compatible."
>
> Systemd stdout doesn't handle this and probably never will. Check your
> logs, as with any service issue.

This is something that may be confusing as people get used to systemd
rather than the old init. The "log" output for most services is now sent
to your syslog rather than stdout, even if starting manually.

grep StandardOutput= /lib/systemd/system/*.service

So whenever any service fails, you need to get used to looking in syslog
first for any possible description.

--
Deron Meranda
http://deron.meranda.us/
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-17-2011, 06:20 PM
Lamar Owen
 
Default Can't start portgresql after F15 -> F16 upgrade

On Nov 17, 2011, at 2:08 PM, Michael Cronenworth wrote:
PostgreSQL version upgrades have always had to be handled by data
dumps

and data imports. With PostgreSQL 9.0 an upgrade utility was created,
but it is not run by default as it is not considered stable. It works
fine for me though. Perform a "yum install postgresql-upgrade" to
install the utility and run "pg_upgrade" as root.


:-)

That wasn't the first cut at pg_upgrade, but IMO it's the best cut at
it so far.


What folks sometimes neglect to realize is how programmable the
backend of PostgreSQL really is, and how that a full upgrade can
involve recompiling or rebuilding functions inside the database (you
can have user-written functions in C, Perl, Python, Tcl, and Ruby with
Fedora-stock packages, for instance). That was always the hardest
part of trying to upgrade PostgreSQL in a sane fashion.


And there is a postgresql-upgrade package in the repositories, but
not, apparently, on the install DVD.--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-17-2011, 06:36 PM
Joe Zeff
 
Default Can't start portgresql after F15 -> F16 upgrade

On 11/17/2011 11:08 AM, Michael Cronenworth wrote:
> Digimer wrote:
>> > 1. This should have generated a more useful error, like "data is from an
>> > old version and is not compatible."
> Systemd stdout doesn't handle this and probably never will. Check your
> logs, as with any service issue.
>

I think the point is that the error messages should not only tell you
that it failed, but something about *why* it failed so that when you
check the logs you'll have a better chance of knowing what to do. If
all the program can do is put a numeric error code in the log, the
documentation should list the possible error codes with explanations.
Good programmers don't assume that J. Random User will be a psychic and
be able to read their fscking minds to find out what an obscure error
code means, but by that standard, there are very, very few good
programmers out there.

The late Dan Alderson was a genius, and a fantastic programmer.
However, one of his favorite error messages was "1 = 2." He'd use it in
nested IF statements, where it appeared that all possibilities had been
covered, to show that something had come up he hadn't anticipated.
Generally speaking, there'd only be one place in the program where he'd
need to do this, so if/when it came up, he knew right where to look.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-17-2011, 06:56 PM
Reindl Harald
 
Default Can't start portgresql after F15 -> F16 upgrade

Am 17.11.2011 20:36, schrieb Joe Zeff:
> On 11/17/2011 11:08 AM, Michael Cronenworth wrote:
>> Digimer wrote:
>>>> 1. This should have generated a more useful error, like "data is from an
>>>> old version and is not compatible."
>> Systemd stdout doesn't handle this and probably never will. Check your
>> logs, as with any service issue.
>>
>
> I think the point is that the error messages should not only tell you
> that it failed, but something about *why* it failed so that when you
> check the logs you'll have a better chance of knowing what to do. If
> all the program can do is put a numeric error code in the log

you are missing the differnece systemd / application

systemd gets back the nuermic non-zero code
the application is responslible write in their logs why it refuses to start

after upgrades you have normally to watch system AND applicaton
logs even if all starts

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 02:54 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org