pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedDatabase not restarting
2+ messages / 2 participants
[nested] [flat]
* Database not restarting
@ 2003-03-26 12:18 Stefan Berg <svb1@ananzi.co.za>
2003-03-27 06:22 ` Re: Database not restarting Josh Berkus <josh@agliodbs.com>
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Berg @ 2003-03-26 12:18 UTC (permalink / raw)
To: pgsql-sql
Hi list,
Having a problem shutting down
a database (ver 7.3.1)
I basically restart a certain database every night
because it always used to be the easy solution,
to get rid of unwanted zombie connections,
left by people who close front end aps by
switching off their computers.
The problem now is, that with one big database,
these type of runnaway processes actually keeps
the database from shutting down.
I initiate all this by killing the postmaster
(kill -15), I then get these nice logs :
2003-03-23 17:30:01 LOG: smart shutdown request
2003-03-23 17:30:01 LOG: shutting down
2003-03-23 17:30:02 LOG: connection received: host=bubba
port=3400000
2003-03-23 17:30:02 FATAL: The database system is shutting
down
2003-03-23 17:30:04 LOG: recycled transaction log file
00000052000000A0
2003-03-23 17:30:04 LOG: recycled transaction log file
00000052000000A1
2003-03-23 17:30:04 LOG: recycled transaction log file
00000052000000A2
2003-03-23 17:30:04 LOG: removing transaction log file
00000052000000A3
2003-03-23 17:30:04 LOG: removing transaction log file
00000052000000A4
2003-03-23 17:30:04 LOG: removing transaction log file
00000052000000A5
2003-03-23 17:30:04 LOG: removing transaction log file
00000052000000A6
2003-03-23 17:30:04 LOG: database system is shut down
2003-03-25 18:01:14 LOG: database system was shut down at
2003-03-25 18:00:54 SAST
OK, the fictional host trying to connect, is a script
I wrote to check if the database has been shut down or not.
You can see my problem between 17:30:04 and 18:01:14
This was caused by some stray idle connection that I
just killed (-15), and then the database finally shut down.
My current script attempt to kill this kind of stray
process,
is making me scared. Now my question:
Can anyone give some advise on an elegant way to shut down
the database properly. In my case, I don't worry or care
if someone was still busy on the database, because nobody
updates stuff.
Any help will be appreciated.
Stef
==
Download ringtones, logos and picture messages at Ananzi Mobile Fun.
http://www.ananzi.co.za/cgi-bin/goto.pl?mobile
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Database not restarting
2003-03-26 12:18 Database not restarting Stefan Berg <svb1@ananzi.co.za>
@ 2003-03-27 06:22 ` Josh Berkus <josh@agliodbs.com>
0 siblings, 0 replies; 2+ messages in thread
From: Josh Berkus @ 2003-03-27 06:22 UTC (permalink / raw)
To: Stefan Berg <svb1@ananzi.co.za>; +Cc: pgsql-sql
Stef,
> Can anyone give some advise on an elegant way to shut down
> the database properly. In my case, I don't worry or care
> if someone was still busy on the database, because nobody
> updates stuff.
$PGHOME/bin/pg_ctl -m fast stop
There was a bug with "fast" shutdown in pg_ctl in some versions of Postgres;
I'm not sure whether or not it's fixed in 7.3.1 but it certainly is fixed in
7.3.3.
--
Josh Berkus
Aglio Database Solutions
San Francisco
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-03-27 06:22 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-03-26 12:18 Database not restarting Stefan Berg <svb1@ananzi.co.za>
2003-03-27 06:22 ` Josh Berkus <josh@agliodbs.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox