This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: postgresql-8.01 and 8.1 ready
Signal TERM is correctly handled by postmaster,
postmaster running as SYSTEM owned service.
So --termsig INT is not needed anymore.
I'd prefer TERM over INT: smart shutdown vs. fast shutdown
For more technical details later or in a seperate cygwin discussion,
not here in -apps
I'll have to wade through the sources in between.
See below:
SYSTEM $ kill -TERM <first postmaster pid>
SYSTEM $ cat /var/log/postgresql.log
LOG: database system was shut down at 2005-09-26 09:54:28 WEST
LOG: checkpoint record is at 0/38CB50
LOG: redo record is at 0/38CB50; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 562; next OID: 10791
LOG: next MultiXactId: 1; next MultiXactOffset: 0
LOG: database system is ready
LOG: transaction ID wrap limit is 2147484144, limited by database "postgres"
LOG: received smart shutdown request
LOG: shutting down
LOG: database system is shut down
SYSTEM $ /etc/init.d/postgresql start
SYSTEM $ kill -INT <first postmaster pid>
SYSTEM $ tail /var/log/postgresql.log
LOG: received fast shutdown request
LOG: shutting down
LOG: database system is shut down
On 9/24/05, Jason Tishler <jason@tishler.net> wrote:
> On Sat, Sep 24, 2005 at 03:07:05PM +0200, Reini Urban wrote:
> > >To be specific, why doesn't the following (excerpt) from my
> > >PostgreSQL 7.x README work for 8.x?
> > >
> > > $ cygserver-config
> > > $ net user postgres $password /add /fullname:postgres
> > > /comment:'PostgreSQL user account' /homedir:"$(cygpath -w
> > > /home/postgres)"
> > > $ mkpasswd -l -u postgres >>/etc/passwd
> > > $ cmd /c secpol.msc # grant postgres "Log on as a service" user right
> > > $ cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D
> > > /var/postgresql/data -i" --dep cygserver --termsig INT --user postgres
> > > --shutdown
> >
> > Because 8.x put postmaster into /usr/sbin
>
> With the the minor change to postmaster's path, does the above still
> work?
>
> > I haven't checked --termsig INT though.
>
> I would expect the above to still work too. But, you should verify to
> make sure of clean database shutdown semantics when the machine is
> shutdown.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/