Skip to Content.
Sympa Menu

sm-grimoire - Re: [SM-Grimoire] postgresql startup

sm-grimoire AT lists.ibiblio.org

Subject: Discussion of Spells and Grimoire items

List archive

Chronological Thread  
  • From: julian AT openit.de (Julian v. Bock)
  • To: Seth Woolley <seth AT tautology.org>
  • Cc: Pierre Abbat <phma AT webjockey.net>, Source Mage - Grimoire <sm-grimoire AT lists.ibiblio.org>
  • Subject: Re: [SM-Grimoire] postgresql startup
  • Date: Fri, 03 Jan 2003 17:56:22 +0100

Hi

>>>>> "SW" == Seth Woolley <seth AT tautology.org> writes:

SW> change -D to wherever you put your data, etc.

We should not impose where to put the data. DBAs tend to not like
that ;)

SW> There's other stuff that needs to happen, too. like database
SW> creation if it doesn't already exist

Create what database? What encoding? Who is the superuser? Who
owns the database? [10 other questions]
With what modifications to the postgresql.conf? [another 30 questions]

SW> needs a way to upgrade seamlessly (as possible) on updates.

You want the spell to try to automatically update between releases
like 7.2.3 and 7.3?????

I hope you don't meet the dba at night who had to recover all the
critical data after things went wrong. There are likely to be
incompatibilities between major releases (as there are between 7.2.3
and 7.3) and pg_dump does not always print the schema in correct order
BTW so you might need to fix the dump manually...

SW> If the
SW> spell knew how to do all that during install it would be pretty
SW> easy

... to ruin someone's day.

SW> (now I haven't checked the spell to see if it does that
SW> already, so don't sue me if it does).

I am pretty sure it does not. If it does, I will remove that bug
immediately.

SW> #!/bin/sh

SW> case $1 in start|restart) echo "$1ing postgresql postmaster."
SW> pkill "^postmaster$" su postgres -c '/usr/bin/postmaster -D
SW> /home/postgres/data' & ;; stop) echo "$1ing postgresql
SW> postmaster." pkill "^postmaster$" ;; *) echo "Usage: $0
SW> {start|stop|restart}" ;; esac

1. I hate the "stoping foo" messages. It is just plain wrong.

2. Send the postmaster a SIGINT. This will cause a fast shutdown.
Otherwise the postmaster will wait (forever) until all connections
(psql shell etc.) are closed.
In this case (shutdown / reboot) this means that the postmaster
gets a SIGKILL after a few seconds.

Julian




Archive powered by MHonArc 2.6.24.

Top of Page