Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-27 Thread Rich Shepard

On Sun, 27 Jul 2008, Andrej Ricnik-Bay wrote:


I thought we had established that this issue was caused by the current
instance pointing at the old installs data directory?


  No, that wasn't the problem.

  If I use 'postgres -D /var/lib/pgsql/data ' the postmaster starts
correctly and everything runs as intended. If I use '/etc/rc.d/rc.postgresql
start' I get error messages about the postmaster already running and an
invalid .pid.


That should be quite easy to tweak, really ... my current script (slightly
modified from the one in contrib/startup-scripts) is attached... You may
need to change the dirs in the script yet a bit.


  Thank you. I think that for some reason using pg_ctl to start the
postmaster is no longer working here. As I have time, I'll look into why.

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-27 Thread Andrej Ricnik-Bay
2008/7/28 Rich Shepard [EMAIL PROTECTED]:
  Thank you. I think that for some reason using pg_ctl to start the
 postmaster is no longer working here. As I have time, I'll look into why.
Can you do a 'locate pg_ctl|xargs ls -l' and see whether you have more than one
installed, and if so, which one comes first in the PATH?

 Rich
Cheers,
Andrej


-- 
Please don't top post, and don't use HTML e-Mail :} Make your quotes concise.

http://www.american.edu/econ/notes/htmlmail.htm

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-27 Thread Rich Shepard

On Mon, 28 Jul 2008, Andrej Ricnik-Bay wrote:


Can you do a 'locate pg_ctl|xargs ls -l' and see whether you have more
than one installed, and if so, which one comes first in the PATH?


Andrej,

  There are two:

-rwxr-xr-x 1 root root 24320 2008-06-17 16:18 /usr/bin/pg_ctl
-rw-r--r-- 1 root root 17286 2007-11-10 13:48
/usr/doc/postgresql-8.3.3/src/sgml/ref/pg_ctl-ref.sgml
-rw-r--r-- 1 root root  3536 2008-06-17 16:18 /usr/man/man1/pg_ctl.1.gz
-rwxr-xr-x 1 root root 32316 2008-06-18 09:50 /usr3/pg813/bin/pg_ctl
-rw-r--r-- 1 root root   2008-06-18 09:50 /usr3/pg813/man/man1/pg_ctl.1

and /usr3/pg813 is not in anyone's path. It's a data storage filesystem and
holds the earlier version during the upgrade. And, now that 8.3.3 is
running, I'll remove that directory.

  Postgres' path is: /bin:/usr/bin:/home/postgres/bin:/sbin:/usr/sbin.

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Rich Shepard

On Wed, 23 Jul 2008, Andrej Ricnik-Bay wrote:


Now there's an interesting piece of information :) How long
ago did you upgrade it?


Andrej,

  I found the thread in the archives for June of this year.

  Re-reading the posted results of running initdb I tried a different
approach to starting the server. Instead of using pg_ctl I used 'postgres -D
/var/lib/pgsql/data ' (while logged in as user postgres, of course.) That
cleaned up a bad shutdown (when I had to reboot the system after it hung),
fixed the missing socket, and replaced the .pid. So, it's up and running
once again.

  My question is how best to modify the startup script so the postmaster
fires up when the system is rebooted. I don't see an option to 'su' to
specify the postgres user's password so I can script this. Have you any
recommendation?

Thanks,

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Andrej Ricnik-Bay
On 27/07/2008, Rich Shepard [EMAIL PROTECTED] wrote:

  Andrej,
Hi Rich,

   I found the thread in the archives for June of this year.

   Re-reading the posted results of running initdb I tried a different
  approach to starting the server. Instead of using pg_ctl I used 'postgres
 -D
  /var/lib/pgsql/data ' (while logged in as user postgres, of course.) That
  cleaned up a bad shutdown (when I had to reboot the system after it hung),
  fixed the missing socket, and replaced the .pid. So, it's up and running
  once again.

   My question is how best to modify the startup script so the postmaster
  fires up when the system is rebooted. I don't see an option to 'su' to
  specify the postgres user's password so I can script this. Have you any
  recommendation?
Since Slackware doesn't use the SysV style of inits but default the
easiest way for you to achieve an automatic start-up of postgres
on reboot would be to add something like
if [ -x /etc/rc.d/rc.postgres ]; then
  /etc/rc.d/rc.postgres start
fi
to your /etc/rc.d/rc.local


  Thanks,

  Rich
Cheers,
Andrej


-- 
Please don't top post, and don't use HTML e-Mail :}  Make your quotes concise.

http://www.american.edu/econ/notes/htmlmail.htm

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Tom Lane
Rich Shepard [EMAIL PROTECTED] writes:
My question is how best to modify the startup script so the postmaster
 fires up when the system is rebooted. I don't see an option to 'su' to
 specify the postgres user's password so I can script this.

Startup scripts invariably run as root, so 'su' isn't going to ask
for a password...

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Andrej Ricnik-Bay
On 27/07/2008, Tom Lane [EMAIL PROTECTED] wrote:
 Startup scripts invariably run as root, so 'su' isn't going to ask
  for a password...
And it's nothing to worry about because the script he's using
is suing to the postgres user anyway ...


 regards, tom lane
Cheerw,
Andrej


-- 
Please don't top post, and don't use HTML e-Mail :}  Make your quotes concise.

http://www.american.edu/econ/notes/htmlmail.htm

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Rich Shepard

On Sun, 27 Jul 2008, Andrej Ricnik-Bay wrote:


if [ -x /etc/rc.d/rc.postgres ]; then
 /etc/rc.d/rc.postgres start
fi
to your /etc/rc.d/rc.local


  Well, that's the problem, Andrej. I have that script, and it worked fine
with postgres-6.x through -8.1, but failed to correctly start the postmaster
after the system reboot.

  I can try twiddling with the script; it calls pg_ctl, and that should
work, but apparently something broke last week.

Thanks,

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Rich Shepard

On Sat, 26 Jul 2008, Tom Lane wrote:


Startup scripts invariably run as root, so 'su' isn't going to ask for a
password...


Tom,

  That occurred to me after I wrote the message. Think that I'll tune the
script to use a command that I know is working with 8.3.3.

Many thanks,

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-26 Thread Andrej Ricnik-Bay
On 27/07/2008, Rich Shepard [EMAIL PROTECTED] wrote:

   Well, that's the problem, Andrej. I have that script, and it worked fine
  with postgres-6.x through -8.1, but failed to correctly start the
 postmaster  after the system reboot.
I thought we had established that this issue was caused by
the current instance pointing at the old installs data directory?


   I can try twiddling with the script; it calls pg_ctl, and that should
  work, but apparently something broke last week.
That should be quite easy to tweak, really ... my current script
(slightly modified from the one in contrib/startup-scripts) is attached...
You may need to change the dirs in the script yet a bit.

  Thanks,

  Rich
Cheers,
Andrej


-- 
Please don't top post, and don't use HTML e-Mail :}  Make your quotes concise.

http://www.american.edu/econ/notes/htmlmail.htm


rc.postgres
Description: Binary data

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Rich Shepard

  My server is rebooted infrequently, usually after a kernel upgrade and
on very rare occasions when something causes it to hang. After rebooting I
always have serious issues getting postgresql running again, even though the
startup script is part of the boot sequence. Yesterday was one of those
highly unusual hangs, and I cannot restart the service. I'd like to
understand why.

  When I run the Slackware script, '/etc/rc.d/rc.postgresql start' (script
attached), I'm shown a process ID and told the daemon is already running.
For example:

Starting PostgreSQL
15342
PostgreSQL daemon already running

  However, there is no process ID 15342, and no postgres running. I manually
removed /tmp/.s.PGSQL.5432 and its log file. Also -- apparently in error --
the .pid file. Makes no difference.

  Perhaps there's an error in the script that I'm not seeing (I didn't write
it). Regardless, if I learn why there's a problem I can fix the script and
avoid this delay and hassle restarting postgres after the daemon's been shut
down.

TIA,

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863#!/bin/bash

# PostgreSQL startup script for Slackware Linux
# Copyright 2007 Adis Nezirovic adis _at_ linux.org.ba
# Licensed under GNU GPL v2

# Do not source this script (since it contains exit() calls)

# Before you can run postgresql you'll need to create the
# database files in /var/lib/pgsql. The following should do
# the trick.
#
#   $ su postgres -c initdb -D /var/lib/pgsql/data
#

LOGFILE=/var/log/postgresql
DATADIR=/var/lib/pgsql/data
POSTGRES=/usr/bin/postgres
PIDFILE=postmaster.pid

# Return values (according to LSB):
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. reload)
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running

pg_ctl()
{
CMD=/usr/bin/pg_ctl $@
su - postgres -c $CMD
}

if [ ! -f $POSTGRES ]; then
echo Could not find 'postgres' binary. Maybe PostgreSQL is not 
installed properly?
exit 5
fi

case $1 in

start)
echo Starting PostgreSQL
touch $LOGFILE
chown postgres:wheel $LOGFILE
chmod 0640 $LOGFILE

if [ ! -e $DATADIR/PG_VERSION ]; then
echo You should initialize the PostgreSQL database at 
location $DATADIR
exit 6
fi

if pgrep postgres; then

echo PostgreSQL daemon already running
if [ ! -f $DATADIR/$PIDFILE ]; then
echo Warning: Missing pid file 
$DATADIR/$PIDFILE
fi
exit 1

else # remove old socket, if it exists and no daemon is running.

if [ ! -f $DATADIR/$PIDFILE ]; then
rm -f /tmp/.s.PGSQL.5432
rm -f /tmp/.s.PGSQL.5432.lock
pg_ctl start -w -l $LOGFILE -D $DATADIR
exit 0
else
echo PostgreSQL daemon was not properly shut 
down
echo Please remove stale pid file 
$DATADIR/$PIDFILE
exit 7
fi

fi  
;;

stop)
echo Shutting down PostgreSQL...
pg_ctl stop -l $LOGFILE -D $DATADIR -m smart
;;

restart)
echo Restarting PostgreSQL...
pg_ctl restart -l $LOGFILE -D $DATADIR -m smart
;;

reload)
echo Reloading configuration for PostgreSQL...
pg_ctl reload -l $LOGFILE -D $DATADIR -m smart
;;

status)
if pgrep postgres; then
echo PostgreSQL is running

if [ ! -e $DATADIR/$PIDFILE ]; then
echo Warning: Missing pid file 
$DATADIR/$PIDFILE
fi

exit 0
else
echo PostgreSQL is stopped

if [ -e $DATADIR/$PIDFILE ]; then
echo Detected stale pid file $DATADIR/$PIDFILE
fi

exit 0
fi
;;

*)
echo Usage: $0 {start|stop|status|restart|reload}
exit 1
;;
esac

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Tom Lane
Rich Shepard [EMAIL PROTECTED] writes:
My server is rebooted infrequently, usually after a kernel upgrade and
 on very rare occasions when something causes it to hang. After rebooting I
 always have serious issues getting postgresql running again, even though the
 startup script is part of the boot sequence. Yesterday was one of those
 highly unusual hangs, and I cannot restart the service. I'd like to
 understand why.

When I run the Slackware script, '/etc/rc.d/rc.postgresql start' (script
 attached), I'm shown a process ID and told the daemon is already running.

The short answer is probably don't use Slackware's startup script.
Some distros have PG start scripts that have had the bugs beaten out
of them, and others not so much.

Perhaps there's an error in the script that I'm not seeing (I didn't write
 it). Regardless, if I learn why there's a problem I can fix the script and
 avoid this delay and hassle restarting postgres after the daemon's been shut
 down.

Have you read the script to see what condition causes it to issue the
mentioned error?  I'd imagine that it's looking at some other lockfile
than you think.

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Rich Shepard

On Tue, 22 Jul 2008, Tom Lane wrote:


The short answer is probably don't use Slackware's startup script. Some
distros have PG start scripts that have had the bugs beaten out of them,
and others not so much.


  Excellent advice, Tom. I'll take it.


Have you read the script to see what condition causes it to issue the
mentioned error?  I'd imagine that it's looking at some other lockfile
than you think.


  I tried following the logic, and it appears the issue now is 'invalid data
in PID file /var/lib/pgsql/data/postmaster.pid '. If I delete that file,
is it automatically recreated? I'm using /usr/bin/pg_ctl as user postgres.

Thanks,

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Tom Lane
Rich Shepard [EMAIL PROTECTED] writes:
I tried following the logic, and it appears the issue now is 'invalid data
 in PID file /var/lib/pgsql/data/postmaster.pid '. If I delete that file,
 is it automatically recreated? I'm using /usr/bin/pg_ctl as user postgres.

If you're certain there's no postmaster running, it's safe to remove
postmaster.pid.  However you really shouldn't have to; the postmaster
is generally able to figure out whether a pidfile is live or not.

The invalid data bit is interesting though.  It looks like pg_ctl
would produce that error if the pidfile exists but is empty when it
looks.  This seems like a race condition hazard, though the odds of
hitting it are tiny.  What's in the file exactly?

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Rich Shepard

On Tue, 22 Jul 2008, Tom Lane wrote:


If you're certain there's no postmaster running, it's safe to remove
postmaster.pid. However you really shouldn't have to; the postmaster is
generally able to figure out whether a pidfile is live or not.


Tom,

  I thought the postmaster knew what was current and what needed to be
replaced, but the process ID in the pidfile did not exist.


The invalid data bit is interesting though.  It looks like pg_ctl would
produce that error if the pidfile exists but is empty when it looks.  This
seems like a race condition hazard, though the odds of hitting it are
tiny.  What's in the file exactly?


  I deleted the .pid, but still could not get the postmaster running. Then I
'touched' the name so I had an empty file. Made no difference. While pg_ctl
tells me the server is starting, there is no /tmp/.s.PGSQL*, no pidfile, and
no postmaster process.

  In the past I've managed to start the postmaster daemon manually, but
today I seem to have it FUBARed.

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Jeff Soules
  I tried following the logic, and it appears the issue now is 'invalid data
 in PID file /var/lib/pgsql/data/postmaster.pid '. If I delete that file,
 is it automatically recreated?

Why not just move it and rename it?  If it's recreated, great; if not,
you still have the corrupted file on hand to try to fix, no?

On Tue, Jul 22, 2008 at 11:15 AM, Rich Shepard [EMAIL PROTECTED] wrote:
 On Tue, 22 Jul 2008, Tom Lane wrote:

 The short answer is probably don't use Slackware's startup script. Some
 distros have PG start scripts that have had the bugs beaten out of them,
 and others not so much.

  Excellent advice, Tom. I'll take it.

 Have you read the script to see what condition causes it to issue the
 mentioned error?  I'd imagine that it's looking at some other lockfile
 than you think.

  I tried following the logic, and it appears the issue now is 'invalid data
 in PID file /var/lib/pgsql/data/postmaster.pid '. If I delete that file,
 is it automatically recreated? I'm using /usr/bin/pg_ctl as user postgres.

 Thanks,

 Rich

 --
 Richard B. Shepard, Ph.D.   |  IntegrityCredibility
 Applied Ecosystem Services, Inc.|Innovation
 http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863

 --
 Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
 To make changes to your subscription:
 http://www.postgresql.org/mailpref/pgsql-general


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Andrej Ricnik-Bay
On 23/07/2008, Rich Shepard [EMAIL PROTECTED] wrote:

   When I run the Slackware script, '/etc/rc.d/rc.postgresql start' (script
  attached), I'm shown a process ID and told the daemon is already running.
  For example:
Since there are no official Slackware postgres packages
I'd like to ask where that script came from :) and how you
installed postges in the first place.  Happy to communicate
of the list if you prefer that.


  TIA,

  Rich
Cheers,
Andrej

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Tom Lane
Rich Shepard [EMAIL PROTECTED] writes:
 On Tue, 22 Jul 2008, Tom Lane wrote:
 The invalid data bit is interesting though.  It looks like pg_ctl would
 produce that error if the pidfile exists but is empty when it looks.  This
 seems like a race condition hazard, though the odds of hitting it are
 tiny.  What's in the file exactly?

I deleted the .pid, but still could not get the postmaster running. Then I
 'touched' the name so I had an empty file. Made no difference. While pg_ctl
 tells me the server is starting, there is no /tmp/.s.PGSQL*, no pidfile, and
 no postmaster process.

Sounds to me like the postmaster tries to start and fails.  Look into
the postmaster log.  (If the log is going to /dev/null, send it
someplace else...)

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Rich Shepard

On Wed, 23 Jul 2008, Andrej Ricnik-Bay wrote:


Since there are no official Slackware postgres packages I'd like to ask
where that script came from :) and how you installed postges in the first
place.  Happy to communicate of the list if you prefer that.


Andrej,

  Unless others consider this topic to be not appropriate for the list, I
don't mind a public conversation. I thought that I attached the script to my
original message; regardless, here's the attribution:

# PostgreSQL startup script for Slackware Linux
# Copyright 2007 Adis Nezirovic adis _at_ linux.org.ba
# Licensed under GNU GPL v2

  I upgraded postgres manually, not creating and using a Slackware package.
It worked just fine until yesterday's reboot.

Thanks,

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Andrej Ricnik-Bay
On 23/07/2008, Rich Shepard [EMAIL PROTECTED] wrote:

  Andrej,

Hi Rich,

  Unless others consider this topic to be not appropriate for the list, I
  don't mind a public conversation. I thought that I attached the script to
  my original message; regardless, here's the attribution:

You did - my bad. I usually ignore attachments on mailing-lists,
and did so with yours.


   I upgraded postgres manually, not creating and using a Slackware package.
  It worked just fine until yesterday's reboot.

Now there's an interesting piece of information :) How long
ago did you upgrade it?
From which version of pg to which version did you upgrade,
and how did you go about it?  Chances are indeed that the
postmasters logfile (/var/log/postgres) may hold crucial
information as Tom suggested.


  Thanks,

  Rich

Cheers,
Andrej


-- 
Please don't top post, and don't use HTML e-Mail :}  Make your quotes concise.

http://www.american.edu/econ/notes/htmlmail.htm

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Rich Shepard

On Wed, 23 Jul 2008, Andrej Ricnik-Bay wrote:


Now there's an interesting piece of information :) How long
ago did you upgrade it?


Andrej,

   A month ago; June 17th to be exact.


From which version of pg to which version did you upgrade,


   From 8.1.13 to 8.3.3.


and how did you go about it?  Chances are indeed that the postmasters
logfile (/var/log/postgres) may hold crucial information as Tom suggested.


   Well, after digging myself into a hole, I received help here and climbed
out. It was working last week (when I made some entries into my accounting
system and viewed the local version of our web site). However, ...

   ... something broke during the reboot. From /var/log/postgresql:

FATAL:  database files are incompatible with server
DETAIL:  The database cluster was initialized with PG_CONTROL_VERSION 812,
but the server was compiled with PG_CONTROL_VERSION 833.
HINT:  It looks like you need to initdb.

   I still have the old pgsql (8.1.13) still in a non-standard directory. I
had run initdb after cleaning up the upgrade. Should I do so again?

Thanks,

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Restarting PostgreSQL Daemon

2008-07-22 Thread Joshua D. Drake
On Tue, 2008-07-22 at 18:05 -0700, Rich Shepard wrote:
 On Wed, 23 Jul 2008, Andrej Ricnik-Bay wrote:
 
  Now there's an interesting piece of information :) How long
  ago did you upgrade it?
 

 ... something broke during the reboot. From /var/log/postgresql:
 
 FATAL:  database files are incompatible with server
 DETAIL:  The database cluster was initialized with PG_CONTROL_VERSION 812,
 but the server was compiled with PG_CONTROL_VERSION 833.
 HINT:  It looks like you need to initdb.
 
 I still have the old pgsql (8.1.13) still in a non-standard directory. I
 had run initdb after cleaning up the upgrade. Should I do so again?

It looks to me like your init script just isn't pointing to the 8.3.3
data directory. If you are unsure you can do this:

find / -name PG_VERSION

You likely have 2 or 3 of them. Find the one that says 8.3 and make sure
your start up script points there.

Joshua D. Drake



 
 Thanks,
 
 Rich
 
 -- 
 Richard B. Shepard, Ph.D.   |  IntegrityCredibility
 Applied Ecosystem Services, Inc.|Innovation
 http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863
 
-- 
The PostgreSQL Company since 1997: http://www.commandprompt.com/ 
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate




-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general