You are not logged in.

#1 2010-10-27 22:09:09

ejmarkow
Member
From: Siemiechów, Poland
Registered: 2008-09-02
Posts: 84
Website

[Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

After upgrading to postgresql 9.0.1-2 & postgresql-libs 9.0.1-2, upon shutdown, the following message is displayed:

> Initiating Shutdown...
:: Stopping KDE Desktop Manager                                                                   [DONE]
:: Stopping MySQL Server                                                                          [DONE]
:: Stopping PostgreSQL                                                                            [BUSY]
pg_ctl: PID file "/var/lib/postgres/data/postmaster.pid" does not exist
Is server running?                                                                                [FAIL]
:: Stopping ALSA Levels                                                                           [DONE]
.
.
.

Note: When booting up, the PostgreSQL server starts up successfully.

Last edited by ejmarkow (2010-10-28 10:36:07)

Offline

#2 2010-10-27 22:32:08

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

If you upgraded postgresql without doing a dump and restore, good luck to you. Know how your packages work.

Offline

#3 2010-10-28 08:20:49

ejmarkow
Member
From: Siemiechów, Poland
Registered: 2008-09-02
Posts: 84
Website

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

toofishes wrote:

If you upgraded postgresql without doing a dump and restore, good luck to you. Know how your packages work.

@toofishes: I know quite well how my packages work. It's just I never saw this before when upgrading PostgreSQL and not having to use dump or restore.

Offline

#4 2010-10-28 10:07:53

toffyrn
Member
Registered: 2008-10-07
Posts: 221

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

From http://www.postgresql.org/docs/9.0/static/release-9-0

E.2.2. Migration to Version 9.0

A dump/restore using pg_dump, or use of pg_upgrade, is required for those wishing to migrate data from any previous release.

Version 9.0 contains a number of changes that selectively break backwards compatibility in order to support new features and code quality improvements. In particular, users who make extensive use of PL/pgSQL, Point-In-Time Recovery (PITR), or Warm Standby should test their applications because of slight user-visible changes in those areas. Observe the following incompatibilities:

....

Are your data still there?

Offline

#5 2010-10-28 10:35:26

ejmarkow
Member
From: Siemiechów, Poland
Registered: 2008-09-02
Posts: 84
Website

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

toffyrn wrote:

From http://www.postgresql.org/docs/9.0/static/release-9-0

E.2.2. Migration to Version 9.0

A dump/restore using pg_dump, or use of pg_upgrade, is required for those wishing to migrate data from any previous release.

Version 9.0 contains a number of changes that selectively break backwards compatibility in order to support new features and code quality improvements. In particular, users who make extensive use of PL/pgSQL, Point-In-Time Recovery (PITR), or Warm Standby should test their applications because of slight user-visible changes in those areas. Observe the following incompatibilities:

....

Are your data still there?

@toffryn: Thanks for this migration info. That explains it all. Since I didn't have any crucial data to begin with, I simply uninstalled PostgreSQL, removed the directory /var/lib/postgres/ and all related files, and reinstalled it. Works fine. Thanks.

Offline

#6 2010-10-28 15:56:22

toffyrn
Member
Registered: 2008-10-07
Posts: 221

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

No problem... just remember to look for similar information next time you upgrade postgresql, it has never been "upgrade-safe"...

(therefore: Know how your packages work.) wink

Offline

#7 2010-11-01 16:42:40

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

Guys - I blindly upgraded and didn't do a dump / restore. Is my data gone? Is there a way to get it back?


./

Offline

#8 2010-11-01 16:55:41

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

Carlwill wrote:

Guys - I blindly upgraded and didn't do a dump / restore. Is my data gone? Is there a way to get it back?

Downgrade to postgresql 8.4.4-6, create a dump of your databases, upgrade to postgresql 9.0.1 again and restore. After you have your dump file, you might have to take a backup of the /var/lib/postgres directory and then delete it, before postgresql 9 will start.

Offline

#9 2010-11-01 17:34:00

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

Thank you so much for that URL. I got my data back. Lesson learned. Always BACK YOUR SH** UP!!!


./

Offline

#10 2010-11-01 19:48:32

dedanna1029
Member
From: Cheyenne, WY, US
Registered: 2010-10-01
Posts: 98

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

I've successfully just downgraded:

# pacman -U /var/cache/pacman/pkg/postgresql-8.4.4-6-i686.pkg.tar.xz
resolving dependencies...
looking for inter-conflicts...

Targets (1): postgresql-8.4.4-6 [3.78 MB]

Total Download Size:    0.00 MB
Total Installed Size:   21.31 MB

Proceed with installation? [Y/n] y
checking package integrity...
(1/1) checking for file conflicts                  [######################] 100%
(1/1) upgrading postgresql                         [######################] 100%

Think I'm going to stick with that.

Offline

#11 2010-11-01 19:58:02

toffyrn
Member
Registered: 2008-10-07
Posts: 221

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

Just remember that you cant stick with that forever... sooner or later you'll gonna need to upgrade wink

Offline

#12 2010-11-01 20:21:43

dedanna1029
Member
From: Cheyenne, WY, US
Registered: 2010-10-01
Posts: 98

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

Yeah, I get that, but for now at least I have my db back. Until they find a smoother way to upgrade these things, then this needs to stay as-is, IMO.

Offline

#13 2011-01-22 16:29:55

dedanna1029
Member
From: Cheyenne, WY, US
Registered: 2010-10-01
Posts: 98

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

I decided to start all over with postgresql, as I am to the point of having to upgrade whether I like it or not.

I renamed /var/lib/postgres to /var/lib/postgres.old, and uninstalled the old postgresql. I then installed the new postgresql, recreated my db, and then rebooted. It wouldn't start on boot, just stayed at [BUSY].

I then tried to start it manually once rebooted, and it failed:

# /etc/rc.d/postgresql start
:: Starting PostgreSQL                                                                                                                                [BUSY] pg_ctl: another server might be running; trying to start server anyway
pg_ctl: could not start server
Examine the log output.
                                                                                                                                                      [FAIL]

How do I get it to start?

/var/lib/postgresql.log just reflects:

LOG:  unexpected EOF on client connection
LOG:  unexpected EOF on client connection
LOG:  unexpected EOF on client connection
LOG:  unexpected EOF on client connection
LOG:  unexpected EOF on client connection
LOG:  unexpected EOF on client connection
LOG:  received smart shutdown request
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
LOG:  database system was shut down at 2011-01-22 10:14:38 MST
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
FATAL:  lock file "postmaster.pid" already exists
HINT:  Is another postmaster (PID 1492) running in data directory "/var/lib/postgres/data"?

I've run top, and htop both as root and regular user. It's not running at all.

I have 5 postgresql logs in /var/log:

ls /var/log | grep post
postgresql.log
postgresql.log.1
postgresql.log.2
postgresql.log.3
postgresql.log.4

Which one would be the latest? I'm assuming postgresql.log here.

Thanks.

Last edited by dedanna1029 (2011-01-22 17:31:24)

Offline

#14 2011-01-22 18:10:38

dedanna1029
Member
From: Cheyenne, WY, US
Registered: 2010-10-01
Posts: 98

Re: [Solved] PostgreSQL & Libs 9.0.1-2 Issue: Doesn't Shutdown Properly

Yet I downgrade back to 8.4.4, put the old /var/lib/postgres back in place, reboot, and it's running fine.

Edit, have just tried again going through the steps at the Upgrading postgresql Arch wiki, and found I missed a step. Running fine now on the latest postgresql, thanks.

Last edited by dedanna1029 (2011-01-22 18:51:17)

Offline

Board footer

Powered by FluxBB