running script on server shutdown (TODO)

From: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>
To: pgsql-patches(at)postgresql(dot)org
Subject: running script on server shutdown (TODO)
Date: 2005-12-10 19:36:20
Message-ID: 20051210193620.GA29685@alamut
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

I've written a small patch for following TODO item:
«Add GUC variable to run a command on database
panic or smart/fast/immediate shutdown.»

It adds two GUC variables as:
enable_atexit_script_file
atexit_script_file

postmaster will run related script file with passing shutdown type
(like "smart", "fast" or "immediate") as parameter to script file
on database shutdown. (Sorry, I'm not so good on PostgreSQL internals,
thus couldn't handle "panic" situation at the moment.)

I know, it's not the perfect one but I'd be so apprecited to hear
suggestions for fixing lost/wrong parts of it.

Regards.

--
"We are the middle children of history, raised by television to believe
that someday we'll be millionaires and movie stars and rock stars, but
we won't. And we're just learning this fact," Tyler said. "So don't
fuck with us."

Attachment Content-Type Size
atexit_script.patch text/plain 6.0 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-12-10 20:06:44 Re: running script on server shutdown (TODO)
Previous Message Simon Riggs 2005-12-10 12:07:26 COPY LOCK for WAL bypass