<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >ipcclean</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REV="MADE" HREF="mailto:pgsql-docs@postgresql.org"><LINK REL="HOME" TITLE="PostgreSQL 7.4.1 Documentation" HREF="index.html"><LINK REL="UP" TITLE="PostgreSQL Server Applications" HREF="reference-server.html"><LINK REL="PREVIOUS" TITLE="initlocation" HREF="app-initlocation.html"><LINK REL="NEXT" TITLE="pg_controldata" HREF="app-pgcontroldata.html"><LINK REL="STYLESHEET" TYPE="text/css" HREF="stylesheet.css"><META NAME="creation" CONTENT="2003-12-22T03:48:47"></HEAD ><BODY CLASS="REFENTRY" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="5" ALIGN="center" VALIGN="bottom" >PostgreSQL 7.4.1 Documentation</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="top" ><A HREF="app-initlocation.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="10%" ALIGN="left" VALIGN="top" ><A HREF="app-initlocation.html" >Fast Backward</A ></TD ><TD WIDTH="60%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="top" ><A HREF="app-pgcontroldata.html" >Fast Forward</A ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="top" ><A HREF="app-pgcontroldata.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="APP-IPCCLEAN" ></A ><SPAN CLASS="APPLICATION" >ipcclean</SPAN ></H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN47397" ></A ><H2 >Name</H2 >ipcclean -- remove shared memory and semaphores from an aborted <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > server</DIV ><A NAME="AEN47401" ></A ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN47403" ></A ><H2 >Synopsis</H2 ><P ><TT CLASS="COMMAND" >ipcclean</TT ></P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="R1-APP-IPCCLEAN-1" ></A ><H2 >Description</H2 ><P > <TT CLASS="COMMAND" >ipcclean</TT > removes all shared memory segments and semaphore sets owned by the current user. It is intended to be used for cleaning up after a crashed <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > server (<A HREF="app-postmaster.html" ><SPAN CLASS="APPLICATION" >postmaster</SPAN ></A >). Note that immediately restarting the server will also clean up shared memory and semaphores, so this command is of little real utility. </P ><P > Only the database administrator should execute this program as it can cause bizarre behavior (i.e., crashes) if run during multiuser execution. If this command is executed while a server is running, the shared memory and semaphores allocated by that server will be deleted, which would have rather severe consequences for that server. </P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN47413" ></A ><H2 >Notes</H2 ><P > This script is a hack, but in the many years since it was written, no one has come up with an equally effective and portable solution. Since the <TT CLASS="COMMAND" >postmaster</TT > can now clean up by itself, it is unlikely that <TT CLASS="COMMAND" >ipcclean</TT > will be improved upon in the future. </P ><P > The script makes assumption about the format of output of the <TT CLASS="COMMAND" >ipcs</TT > utility which may not be true across different operating systems. Therefore, it may not work on your particular OS. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="app-initlocation.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="app-pgcontroldata.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><SPAN CLASS="APPLICATION" >initlocation</SPAN ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="reference-server.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><SPAN CLASS="APPLICATION" >pg_controldata</SPAN ></TD ></TR ></TABLE ></DIV ></BODY ></HTML >