1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Fix for hang after postmaster restart. Add new proc_exit and

shmem_exit to replace exitpg().
This commit is contained in:
Bruce Momjian
1998-06-27 04:53:49 +00:00
parent 8fa93b016a
commit e747c58718
18 changed files with 130 additions and 123 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.15 1998/05/29 17:00:19 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.16 1998/06/27 04:53:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -84,7 +84,7 @@ unsigned char RecodeBackTable[128];
void
ExitPostgres(ExitStatus status)
{
exitpg(status);
proc_exit(status);
}
/*
@@ -111,7 +111,7 @@ AbortPostgres()
if (PointerIsValid(abortValue) && abortValue[0] != '\0')
abort();
else
exitpg(FatalExitStatus);
proc_exit(FatalExitStatus);
}
#endif
@@ -125,7 +125,7 @@ StatusBackendExit(int status)
{
/* someday, do some real cleanup and then call the LISP exit */
/* someday, call StatusPostmasterExit if running without postmaster */
exitpg(status);
proc_exit(status);
}
/* ----------------
@@ -136,7 +136,7 @@ void
StatusPostmasterExit(int status)
{
/* someday, do some real cleanup and then call the LISP exit */
exitpg(status);
proc_exit(status);
}
/* ----------------------------------------------------------------

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.29 1998/06/15 19:29:49 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.30 1998/06/27 04:53:48 momjian Exp $
*
* NOTES
* InitPostgres() is the function called from PostgresMain
@@ -481,7 +481,7 @@ InitPostgres(char *name) /* database name */
InitLocalBuffer();
if (!TransactionFlushEnabled())
on_exitpg(FlushBufferPool, (caddr_t) NULL);
on_shmem_exit(FlushBufferPool, (caddr_t) NULL);
/* ----------------
* initialize the database id used for system caches and lock tables
@@ -601,7 +601,7 @@ InitPostgres(char *name) /* database name */
* ----------------
*/
PostgresIsInitialized = true;
/* on_exitpg(DestroyLocalRelList, (caddr_t) NULL); */
/* on_shmem_exit(DestroyLocalRelList, (caddr_t) NULL); */
/* ----------------
* Done with "InitPostgres", now change to NormalProcessing unless