postgresql upgrade: cannot start postmaster

2004-10-29 Thread debian-throwaway1
I upgraded postgresql from 7.2.1-2woody5 to 7.2.1-2woody6 with apt-get, but
experienced some problems getting things working. I've put a redacted log of
what I did to fix it at http://pjt33.f2g.net/postgresql_upgrade_log.html - the
summary is that after running
apt-get upgrade
I had to manually kill the existing postmaster and remove a lock-file, before
running apt-get again to get the configuration to complete.

I seem to recall having a similar problem the last time I upgraded postgresql,
but I can't find any discussion of this problem on the web. Is it unique to my
setup, or is it a known bug?

-
Peter Taylor


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: postgresql upgrade: cannot start postmaster

2004-10-29 Thread debian-throwaway1
Replying to myself: previous e-mail archived at
http://lists.debian.org/debian-user/2004/10/msg03246.html

Digging around, I've tracked down the messages about stopping postgresql to
/etc/init.d/postgresql, which is called by the prerm and preinst scripts. The
problem would seem to be that
/etc/init.d/postgresql stop
will call
start-stop-daemon --stop --verbose --exec ${POSTMASTER}
i.e. without specifying the signal to send. It therefore defaults to SIGTERM (man
 start-stop-daemon). When postmaster receives a SIGTERM it waits for all clients
to disconnect before quitting (man postmaster). The SIGQUIT I sent was overkill:
that causes it to quit without properly aborting any ongoing transactions.
SIGINT provides a half-way house, quitting immediately but safely.

Perhaps preinst and prerm should attempt to kill postmaster with a SIGTERM
(either using the init.d script or pg_ctl), pause, check whether it died, and if
it didn't prompt the user to determine whether to send a SIGINT or abort the
install / removal?

-
Peter Taylor


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]