comments and variables to "auxiliary proc", per Heikki's request.
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/bootstrap/bootparse.y,v 1.86 2007/01/09 02:14:11 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/bootstrap/bootparse.y,v 1.87 2007/03/07 13:35:02 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
elog(ERROR, "incorrect number of columns in row (expected %d, got %d)",
numattr, num_columns_read);
if (boot_reldesc == NULL)
- {
- elog(ERROR, "relation not open");
- err_out();
- }
+ elog(FATAL, "relation not open");
InsertOneTuple($2);
do_end();
}
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.232 2007/02/16 02:10:07 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.233 2007/03/07 13:35:02 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
#include <getopt.h>
#endif
-#define BOOTSTRAP_INCLUDE /* mask out stuff in tcop/tcopprot.h */
-
#include "access/genam.h"
#include "access/heapam.h"
#include "access/xact.h"
#define ALLOC(t, c) ((t *) calloc((unsigned)(c), sizeof(t)))
+static void CheckerModeMain(void);
+static void BootstrapModeMain(void);
static void bootstrap_signals(void);
-static void ShutdownDummyProcess(int code, Datum arg);
+static void ShutdownAuxiliaryProcess(int code, Datum arg);
static hashnode *AddStr(char *str, int strlength, int mderef);
static Form_pg_attribute AllocateAttribute(void);
static int CompHash(char *str, int len);
static struct typmap **Typ = NULL;
static struct typmap *Ap = NULL;
-static int Warnings = 0;
static char Blanks[MAXATTR];
Form_pg_attribute attrtypes[MAXATTR]; /* points to attribute info */
/*
- * The main entry point for running the backend in bootstrap mode
+ * AuxiliaryProcessMain
*
- * The bootstrap mode is used to initialize the template database.
- * The bootstrap backend doesn't speak SQL, but instead expects
- * commands in a special bootstrap language.
+ * The main entry point for auxiliary processes, such as the bgwriter,
+ * bootstrapper and the shared memory checker code.
*
- * For historical reasons, BootstrapMain is also used as the control
- * routine for non-backend subprocesses launched by the postmaster,
- * such as startup and shutdown.
+ * This code is here just because of historical reasons.
*/
-int
-BootstrapMain(int argc, char *argv[])
+void
+AuxiliaryProcessMain(int argc, char *argv[])
{
char *progname = argv[0];
- int i;
int flag;
- int xlogop = BS_XLOG_NOP;
+ AuxProcType auxType = CheckerProcess;
char *userDoption = NULL;
/*
strlcpy(OutputFileName, optarg, MAXPGPATH);
break;
case 'x':
- xlogop = atoi(optarg);
+ auxType = atoi(optarg);
break;
case 'c':
case '-':
{
const char *statmsg;
- switch (xlogop)
+ switch (auxType)
{
- case BS_XLOG_STARTUP:
+ case StartupProcess:
statmsg = "startup process";
break;
- case BS_XLOG_BGWRITER:
+ case BgWriterProcess:
statmsg = "writer process";
break;
default:
BaseInit();
/*
- * When we are a dummy process, we aren't going to do the full
+ * When we are an auxiliary process, we aren't going to do the full
* InitPostgres pushups, but there are a couple of things that need to get
- * lit up even in a dummy process.
+ * lit up even in an auxiliary process.
*/
if (IsUnderPostmaster)
{
* this was already done by SubPostmasterMain().
*/
#ifndef EXEC_BACKEND
- InitDummyProcess();
+ InitAuxiliaryProcess();
#endif
/* finish setting up bufmgr.c */
InitBufferPoolBackend();
/* register a shutdown callback for LWLock cleanup */
- on_shmem_exit(ShutdownDummyProcess, 0);
+ on_shmem_exit(ShutdownAuxiliaryProcess, 0);
}
/*
*/
SetProcessingMode(NormalProcessing);
- switch (xlogop)
+ switch (auxType)
{
- case BS_XLOG_NOP:
+ case CheckerProcess:
bootstrap_signals();
- break;
+ CheckerModeMain();
+ proc_exit(1); /* should never return */
- case BS_XLOG_BOOTSTRAP:
+ case BootstrapProcess:
bootstrap_signals();
BootStrapXLOG();
StartupXLOG();
- break;
+ BootstrapModeMain();
+ proc_exit(1); /* should never return */
- case BS_XLOG_STARTUP:
+ case StartupProcess:
bootstrap_signals();
StartupXLOG();
LoadFreeSpaceMap();
BuildFlatFiles(false);
proc_exit(0); /* startup done */
- case BS_XLOG_BGWRITER:
+ case BgWriterProcess:
/* don't set signals, bgwriter has its own agenda */
InitXLOGAccess();
BackgroundWriterMain();
proc_exit(1); /* should never return */
-
+
default:
- elog(PANIC, "unrecognized XLOG op: %d", xlogop);
+ elog(PANIC, "unrecognized process type: %d", auxType);
proc_exit(1);
}
+}
+/*
+ * In shared memory checker mode, all we really want to do is create shared
+ * memory and semaphores (just to prove we can do it with the current GUC
+ * settings).
+ */
+static void
+CheckerModeMain(void)
+{
/*
* We must be getting invoked for bootstrap mode
*/
* Do backend-like initialization for bootstrap mode
*/
InitProcess();
- (void) InitPostgres(NULL, InvalidOid, NULL, NULL);
+ InitPostgres(NULL, InvalidOid, NULL, NULL);
+ proc_exit(0);
+}
+
+/*
+ * The main entry point for running the backend in bootstrap mode
+ *
+ * The bootstrap mode is used to initialize the template database.
+ * The bootstrap backend doesn't speak SQL, but instead expects
+ * commands in a special bootstrap language.
+ */
+static void
+BootstrapModeMain(void)
+{
+ int i;
+
+ Assert(!IsUnderPostmaster);
+
+ SetProcessingMode(BootstrapProcessing);
/*
- * In NOP mode, all we really want to do is create shared memory and
- * semaphores (just to prove we can do it with the current GUC settings).
- * So, quit now.
+ * Do backend-like initialization for bootstrap mode
*/
- if (xlogop == BS_XLOG_NOP)
- proc_exit(0);
+ InitProcess();
+ InitPostgres(NULL, InvalidOid, NULL, NULL);
/* Initialize stuff for bootstrap-file processing */
for (i = 0; i < MAXATTR; i++)
/* Perform a checkpoint to ensure everything's down to disk */
SetProcessingMode(NormalProcessing);
CreateCheckPoint(true, true);
- SetProcessingMode(BootstrapProcessing);
/* Clean up and exit */
- StartTransactionCommand();
cleanup();
-
- /* not reached, here to make compiler happy */
- return 0;
+ proc_exit(0);
}
}
/*
- * Begin shutdown of a dummy process. This is approximately the equivalent
- * of ShutdownPostgres() in postinit.c. We can't run transactions in a
- * dummy process, so most of the work of AbortTransaction() is not needed,
+ * Begin shutdown of an auxiliary process. This is approximately the equivalent
+ * of ShutdownPostgres() in postinit.c. We can't run transactions in an
+ * auxiliary process, so most of the work of AbortTransaction() is not needed,
* but we do need to make sure we've released any LWLocks we are holding.
* (This is only critical during an error exit.)
*/
static void
-ShutdownDummyProcess(int code, Datum arg)
+ShutdownAuxiliaryProcess(int code, Datum arg)
{
LWLockReleaseAll();
}
-/* ----------------
- * error handling / abort routines
- * ----------------
- */
-void
-err_out(void)
-{
- Warnings++;
- cleanup();
-}
-
-
/* ----------------------------------------------------------------
* MANUAL BACKEND INTERACTIVE INTERFACE COMMANDS
* ----------------------------------------------------------------
elog(DEBUG4, "inserting column %d value \"%s\"", i, value);
- if (Typ != NULL)
- {
- typoid = boot_reldesc->rd_att->attrs[i]->atttypid;
- }
- else
- {
- /* XXX why is typoid determined differently in this case? */
- typoid = attrtypes[i]->atttypid;
- }
+ typoid = boot_reldesc->rd_att->attrs[i]->atttypid;
boot_get_type_io_data(typoid,
&typlen, &typbyval, &typalign,
static void
cleanup(void)
{
- static int beenhere = 0;
-
- if (!beenhere)
- beenhere = 1;
- else
- {
- elog(FATAL, "cleanup called twice");
- proc_exit(1);
- }
if (boot_reldesc != NULL)
closerel(NULL);
- CommitTransactionCommand();
- proc_exit(Warnings ? 1 : 0);
}
/* ----------------
return gettype(type);
}
elog(ERROR, "unrecognized type \"%s\"", type);
- err_out();
/* not reached, here to make compiler happy */
return 0;
}
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/main/main.c,v 1.107 2007/01/05 22:19:29 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/main/main.c,v 1.108 2007/03/07 13:35:02 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
#endif
if (argc > 1 && strcmp(argv[1], "--boot") == 0)
- exit(BootstrapMain(argc, argv));
+ AuxiliaryProcessMain(argc, argv); /* does not return */
if (argc > 1 && strcmp(argv[1], "--describe-config") == 0)
exit(GucInfoMain());
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.32 2007/02/15 23:23:23 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.33 2007/03/07 13:35:02 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
#endif
/*
- * Set up signal handlers. Since this is a "dummy" process, it has
+ * Set up signal handlers. Since this is an auxiliary process, it has
* particular signal requirements -- no deadlock checker or sinval
* catchup, for example.
*
* had to do some stuff with LWLocks).
*/
#ifndef EXEC_BACKEND
- InitDummyProcess();
+ InitAuxiliaryProcess();
#endif
/*
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.525 2007/02/16 17:06:59 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.526 2007/03/07 13:35:02 alvherre Exp $
*
* NOTES
*
static void SignalSomeChildren(int signal, bool only_autovac);
static int CountChildren(void);
static bool CreateOptsFile(int argc, char *argv[], char *fullprogname);
-static pid_t StartChildProcess(int xlop);
+static pid_t StartChildProcess(AuxProcType type);
static void StartAutovacuumWorker(void);
#ifdef EXEC_BACKEND
LWLock *LWLockArray;
slock_t *ProcStructLock;
PROC_HDR *ProcGlobal;
- PGPROC *DummyProcs;
+ PGPROC *AuxiliaryProcs;
InheritableSocket pgStatSock;
pid_t PostmasterPid;
TimestampTz PgStartTime;
static void ShmemBackendArrayRemove(pid_t pid);
#endif /* EXEC_BACKEND */
-#define StartupDataBase() StartChildProcess(BS_XLOG_STARTUP)
-#define StartBackgroundWriter() StartChildProcess(BS_XLOG_BGWRITER)
+#define StartupDataBase() StartChildProcess(StartupProcess)
+#define StartBackgroundWriter() StartChildProcess(BgWriterProcess)
/* Macros to check exit status of a child process */
#define EXIT_STATUS_0(st) ((st) == 0)
InitShmemAccess(UsedShmemSegAddr);
/* Need a PGPROC to run CreateSharedMemoryAndSemaphores */
- InitDummyProcess();
+ InitAuxiliaryProcess();
/* Attach process to shared data structures */
CreateSharedMemoryAndSemaphores(false, 0);
- BootstrapMain(argc - 2, argv + 2);
+ AuxiliaryProcessMain(argc - 2, argv + 2);
proc_exit(0);
}
if (strcmp(argv[1], "--forkavlauncher") == 0)
InitShmemAccess(UsedShmemSegAddr);
/* Need a PGPROC to run CreateSharedMemoryAndSemaphores */
- InitDummyProcess();
+ InitAuxiliaryProcess();
/* Attach process to shared data structures */
CreateSharedMemoryAndSemaphores(false, 0);
/*
- * StartChildProcess -- start a non-backend child process for the postmaster
+ * StartChildProcess -- start an auxiliary process for the postmaster
*
* xlop determines what kind of child will be started. All child types
- * initially go to BootstrapMain, which will handle common setup.
+ * initially go to AuxiliaryProcessMain, which will handle common setup.
*
* Return value of StartChildProcess is subprocess' PID, or 0 if failed
* to start subprocess.
*/
static pid_t
-StartChildProcess(int xlop)
+StartChildProcess(AuxProcType type)
{
pid_t pid;
char *av[10];
int ac = 0;
- char xlbuf[32];
+ char typebuf[32];
/*
* Set up command-line arguments for subprocess
av[ac++] = NULL; /* filled in by postmaster_forkexec */
#endif
- snprintf(xlbuf, sizeof(xlbuf), "-x%d", xlop);
- av[ac++] = xlbuf;
+ snprintf(typebuf, sizeof(typebuf), "-x%d", type);
+ av[ac++] = typebuf;
av[ac] = NULL;
Assert(ac < lengthof(av));
MemoryContextDelete(PostmasterContext);
PostmasterContext = NULL;
- BootstrapMain(ac, av);
+ AuxiliaryProcessMain(ac, av);
ExitPostmaster(0);
}
#endif /* EXEC_BACKEND */
int save_errno = errno;
errno = save_errno;
- switch (xlop)
+ switch (type)
{
- case BS_XLOG_STARTUP:
+ case StartupProcess:
ereport(LOG,
(errmsg("could not fork startup process: %m")));
break;
- case BS_XLOG_BGWRITER:
+ case BgWriterProcess:
ereport(LOG,
(errmsg("could not fork background writer process: %m")));
break;
* fork failure is fatal during startup, but there's no need to choke
* immediately if starting other child types fails.
*/
- if (xlop == BS_XLOG_STARTUP)
+ if (type == StartupProcess)
ExitPostmaster(1);
return 0;
}
extern LWLock *LWLockArray;
extern slock_t *ProcStructLock;
extern PROC_HDR *ProcGlobal;
-extern PGPROC *DummyProcs;
+extern PGPROC *AuxiliaryProcs;
extern int pgStatSock;
#ifndef WIN32
param->LWLockArray = LWLockArray;
param->ProcStructLock = ProcStructLock;
param->ProcGlobal = ProcGlobal;
- param->DummyProcs = DummyProcs;
+ param->AuxiliaryProcs = AuxiliaryProcs;
write_inheritable_socket(¶m->pgStatSock, pgStatSock, childPid);
param->PostmasterPid = PostmasterPid;
LWLockArray = param->LWLockArray;
ProcStructLock = param->ProcStructLock;
ProcGlobal = param->ProcGlobal;
- DummyProcs = param->DummyProcs;
+ AuxiliaryProcs = param->AuxiliaryProcs;
read_inheritable_socket(&pgStatSock, ¶m->pgStatSock);
PostmasterPid = param->PostmasterPid;
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.185 2007/03/03 18:46:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.186 2007/03/07 13:35:03 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
/* Pointers to shared-memory structures */
NON_EXEC_STATIC PROC_HDR *ProcGlobal = NULL;
-NON_EXEC_STATIC PGPROC *DummyProcs = NULL;
+NON_EXEC_STATIC PGPROC *AuxiliaryProcs = NULL;
/* If we are waiting for a lock, this points to the associated LOCALLOCK */
static LOCALLOCK *lockAwaited = NULL;
static void RemoveProcFromArray(int code, Datum arg);
static void ProcKill(int code, Datum arg);
-static void DummyProcKill(int code, Datum arg);
+static void AuxiliaryProcKill(int code, Datum arg);
static bool CheckStatementTimeout(void);
/* ProcGlobal */
size = add_size(size, sizeof(PROC_HDR));
- /* DummyProcs */
- size = add_size(size, mul_size(NUM_DUMMY_PROCS, sizeof(PGPROC)));
+ /* AuxiliaryProcs */
+ size = add_size(size, mul_size(NUM_AUXILIARY_PROCS, sizeof(PGPROC)));
/* MyProcs */
size = add_size(size, mul_size(MaxBackends, sizeof(PGPROC)));
/* ProcStructLock */
int
ProcGlobalSemas(void)
{
- /* We need a sema per backend, plus one for each dummy process. */
- return MaxBackends + NUM_DUMMY_PROCS;
+ /* We need a sema per backend, plus one for each auxiliary process. */
+ return MaxBackends + NUM_AUXILIARY_PROCS;
}
/*
* postmaster, not in backends.
*
* Note: this is NOT called by individual backends under a postmaster,
- * not even in the EXEC_BACKEND case. The ProcGlobal and DummyProcs
+ * not even in the EXEC_BACKEND case. The ProcGlobal and AuxiliaryProcs
* pointers must be propagated specially for EXEC_BACKEND operation.
*/
void
Assert(!found);
/*
- * Create the PGPROC structures for dummy (bgwriter) processes, too. These
- * do not get linked into the freeProcs list.
+ * Create the PGPROC structures for auxiliary (bgwriter) processes, too.
+ * These do not get linked into the freeProcs list.
*/
- DummyProcs = (PGPROC *)
- ShmemInitStruct("DummyProcs", NUM_DUMMY_PROCS * sizeof(PGPROC),
+ AuxiliaryProcs = (PGPROC *)
+ ShmemInitStruct("AuxiliaryProcs", NUM_AUXILIARY_PROCS * sizeof(PGPROC),
&found);
Assert(!found);
ProcGlobal->freeProcs = MAKE_OFFSET(&procs[i]);
}
- MemSet(DummyProcs, 0, NUM_DUMMY_PROCS * sizeof(PGPROC));
- for (i = 0; i < NUM_DUMMY_PROCS; i++)
+ MemSet(AuxiliaryProcs, 0, NUM_AUXILIARY_PROCS * sizeof(PGPROC));
+ for (i = 0; i < NUM_AUXILIARY_PROCS; i++)
{
- DummyProcs[i].pid = 0; /* marks dummy proc as not in use */
- PGSemaphoreCreate(&(DummyProcs[i].sem));
+ AuxiliaryProcs[i].pid = 0; /* marks auxiliary proc as not in use */
+ PGSemaphoreCreate(&(AuxiliaryProcs[i].sem));
}
/* Create ProcStructLock spinlock, too */
}
/*
- * InitDummyProcess -- create a dummy per-process data structure
+ * InitAuxiliaryProcess -- create a per-auxiliary-process data structure
*
* This is called by bgwriter and similar processes so that they will have a
* MyProc value that's real enough to let them wait for LWLocks. The PGPROC
* and sema that are assigned are one of the extra ones created during
* InitProcGlobal.
*
- * Dummy processes are presently not expected to wait for real (lockmgr)
+ * Auxiliary processes are presently not expected to wait for real (lockmgr)
* locks, so we need not set up the deadlock checker. They are never added
* to the ProcArray or the sinval messaging mechanism, either.
*/
void
-InitDummyProcess(void)
+InitAuxiliaryProcess(void)
{
- PGPROC *dummyproc;
+ PGPROC *auxproc;
int proctype;
int i;
* ProcGlobal should be set up already (if we are a backend, we inherit
* this by fork() or EXEC_BACKEND mechanism from the postmaster).
*/
- if (ProcGlobal == NULL || DummyProcs == NULL)
+ if (ProcGlobal == NULL || AuxiliaryProcs == NULL)
elog(PANIC, "proc header uninitialized");
if (MyProc != NULL)
/*
* We use the ProcStructLock to protect assignment and releasing of
- * DummyProcs entries.
+ * AuxiliaryProcs entries.
*
* While we are holding the ProcStructLock, also copy the current shared
* estimate of spins_per_delay to local storage.
set_spins_per_delay(ProcGlobal->spins_per_delay);
/*
- * Find a free dummyproc ... *big* trouble if there isn't one ...
+ * Find a free auxproc ... *big* trouble if there isn't one ...
*/
- for (proctype = 0; proctype < NUM_DUMMY_PROCS; proctype++)
+ for (proctype = 0; proctype < NUM_AUXILIARY_PROCS; proctype++)
{
- dummyproc = &DummyProcs[proctype];
- if (dummyproc->pid == 0)
+ auxproc = &AuxiliaryProcs[proctype];
+ if (auxproc->pid == 0)
break;
}
- if (proctype >= NUM_DUMMY_PROCS)
+ if (proctype >= NUM_AUXILIARY_PROCS)
{
SpinLockRelease(ProcStructLock);
- elog(FATAL, "all DummyProcs are in use");
+ elog(FATAL, "all AuxiliaryProcs are in use");
}
- /* Mark dummy proc as in use by me */
+ /* Mark auxiliary proc as in use by me */
/* use volatile pointer to prevent code rearrangement */
- ((volatile PGPROC *) dummyproc)->pid = MyProcPid;
+ ((volatile PGPROC *) auxproc)->pid = MyProcPid;
- MyProc = dummyproc;
+ MyProc = auxproc;
SpinLockRelease(ProcStructLock);
/*
* Arrange to clean up at process exit.
*/
- on_shmem_exit(DummyProcKill, Int32GetDatum(proctype));
+ on_shmem_exit(AuxiliaryProcKill, Int32GetDatum(proctype));
}
/*
}
/*
- * DummyProcKill() -- Cut-down version of ProcKill for dummy (bgwriter)
- * processes. The PGPROC and sema are not released, only marked
- * as not-in-use.
+ * AuxiliaryProcKill() -- Cut-down version of ProcKill for auxiliary
+ * processes (bgwriter, etc). The PGPROC and sema are not released, only
+ * marked as not-in-use.
*/
static void
-DummyProcKill(int code, Datum arg)
+AuxiliaryProcKill(int code, Datum arg)
{
int proctype = DatumGetInt32(arg);
- PGPROC *dummyproc;
+ PGPROC *auxproc;
- Assert(proctype >= 0 && proctype < NUM_DUMMY_PROCS);
+ Assert(proctype >= 0 && proctype < NUM_AUXILIARY_PROCS);
- dummyproc = &DummyProcs[proctype];
+ auxproc = &AuxiliaryProcs[proctype];
- Assert(MyProc == dummyproc);
+ Assert(MyProc == auxproc);
/* Release any LW locks I am holding (see notes above) */
LWLockReleaseAll();
SpinLockAcquire(ProcStructLock);
- /* Mark dummy proc no longer in use */
+ /* Mark auxiliary proc no longer in use */
MyProc->pid = 0;
/* PGPROC struct isn't mine anymore */
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/bootstrap/bootstrap.h,v 1.45 2007/01/05 22:19:51 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/bootstrap/bootstrap.h,v 1.46 2007/03/07 13:35:03 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
extern Relation boot_reldesc;
extern Form_pg_attribute attrtypes[MAXATTR];
extern int numattr;
-extern int BootstrapMain(int argc, char *argv[]);
+extern void AuxiliaryProcessMain(int argc, char *argv[]);
extern void index_register(Oid heap, Oid ind, IndexInfo *indexInfo);
extern int boot_yylex(void);
extern void boot_yyerror(const char *str);
-#define BS_XLOG_NOP 0
-#define BS_XLOG_BOOTSTRAP 1
-#define BS_XLOG_STARTUP 2
-#define BS_XLOG_BGWRITER 3
+typedef enum
+{
+ CheckerProcess,
+ BootstrapProcess,
+ StartupProcess,
+ BgWriterProcess
+} AuxProcType;
#endif /* BOOTSTRAP_H */
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/proc.h,v 1.95 2007/03/03 18:46:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/storage/proc.h,v 1.96 2007/03/07 13:35:03 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
} PROC_HDR;
/*
- * We set aside some extra PGPROC structures for "dummy" processes,
+ * We set aside some extra PGPROC structures for auxiliary processes,
* ie things that aren't full-fledged backends but need shmem access.
*/
-#define NUM_DUMMY_PROCS 3
+#define NUM_AUXILIARY_PROCS 3
/* configurable options */
extern void InitProcGlobal(void);
extern void InitProcess(void);
extern void InitProcessPhase2(void);
-extern void InitDummyProcess(void);
+extern void InitAuxiliaryProcess(void);
extern bool HaveNFreeProcs(int n);
extern void ProcReleaseLocks(bool isCommit);
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/tcop/tcopprot.h,v 1.87 2007/02/20 17:32:17 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/tcop/tcopprot.h,v 1.88 2007/03/07 13:35:03 alvherre Exp $
*
* OLD COMMENTS
* This file was created so that other c files could get the two
extern LogStmtLevel log_statement;
-#ifndef BOOTSTRAP_INCLUDE
-
extern List *pg_parse_and_rewrite(const char *query_string,
Oid *paramTypes, int numParams);
extern List *pg_parse_query(const char *query_string);
bool needSnapshot);
extern bool assign_max_stack_depth(int newval, bool doit, GucSource source);
-#endif /* BOOTSTRAP_INCLUDE */
extern void die(SIGNAL_ARGS);
extern void quickdie(SIGNAL_ARGS);