mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Restructure error handling as recently discussed. It is now really
possible to trap an error inside a function rather than letting it propagate out to PostgresMain. You still have to use AbortCurrentTransaction to clean up, but at least the error handling itself will cooperate.
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.416 2004/07/27 01:46:03 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.417 2004/07/31 00:45:33 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@@ -73,7 +73,6 @@
|
||||
#include <ctype.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/socket.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
@@ -3226,6 +3225,11 @@ StartChildProcess(int xlop)
|
||||
/* Lose the postmaster's on-exit routines and port connections */
|
||||
on_exit_reset();
|
||||
|
||||
/* Release postmaster's working memory context */
|
||||
MemoryContextSwitchTo(TopMemoryContext);
|
||||
MemoryContextDelete(PostmasterContext);
|
||||
PostmasterContext = NULL;
|
||||
|
||||
BootstrapMain(ac, av);
|
||||
ExitPostmaster(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user