|
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.98 2000/11/09 11:25:58 vadim Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.99 2000/11/21 09:39:57 vadim Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -341,32 +341,33 @@ BootstrapMain(int argc, char *argv[])
|
341 | 341 | /*
|
342 | 342 | * XLOG operations
|
343 | 343 | */
|
344 |
| - if (xlogop != BS_XLOG_NOP) |
| 344 | + snprintf(XLogDir, MAXPGPATH, "%s/pg_xlog", DataDir); |
| 345 | + snprintf(ControlFilePath, MAXPGPATH, "%s/global/pg_control", DataDir); |
| 346 | + SetProcessingMode(NormalProcessing); |
| 347 | + if (xlogop == BS_XLOG_NOP) |
| 348 | + StartupXLOG(); |
| 349 | + else if (xlogop == BS_XLOG_BOOTSTRAP) |
345 | 350 | {
|
346 |
| - snprintf(XLogDir, MAXPGPATH, "%s/pg_xlog", DataDir); |
347 |
| - snprintf(ControlFilePath, MAXPGPATH, "%s/global/pg_control", DataDir); |
348 |
| - if (xlogop == BS_XLOG_BOOTSTRAP) |
349 |
| - BootStrapXLOG(); |
350 |
| - else |
| 351 | + BootStrapXLOG(); |
| 352 | + StartupXLOG(); |
| 353 | + } |
| 354 | + else |
| 355 | + { |
| 356 | + if (xlogop == BS_XLOG_CHECKPOINT) |
351 | 357 | {
|
352 |
| - SetProcessingMode(NormalProcessing); |
353 |
| - if (xlogop == BS_XLOG_STARTUP) |
354 |
| - StartupXLOG(); |
355 |
| - else if (xlogop == BS_XLOG_CHECKPOINT) |
356 |
| - { |
357 |
| -#ifdef XLOG |
358 |
| - extern void CreateDummyCaches(void); |
359 |
| - CreateDummyCaches(); |
360 |
| -#endif |
361 |
| - CreateCheckPoint(false); |
362 |
| - } |
363 |
| - else if (xlogop == BS_XLOG_SHUTDOWN) |
364 |
| - ShutdownXLOG(); |
365 |
| - else |
366 |
| - elog(STOP, "Unsupported XLOG op %d", xlogop); |
367 |
| - proc_exit(0); |
| 358 | + extern void CreateDummyCaches(void); |
| 359 | + CreateDummyCaches(); |
| 360 | + CreateCheckPoint(false); |
368 | 361 | }
|
| 362 | + else if (xlogop == BS_XLOG_STARTUP) |
| 363 | + StartupXLOG(); |
| 364 | + else if (xlogop == BS_XLOG_SHUTDOWN) |
| 365 | + ShutdownXLOG(); |
| 366 | + else |
| 367 | + elog(STOP, "Unsupported XLOG op %d", xlogop); |
| 368 | + proc_exit(0); |
369 | 369 | }
|
| 370 | + SetProcessingMode(BootstrapProcessing); |
370 | 371 |
|
371 | 372 | /*
|
372 | 373 | * backend initialization
|
@@ -407,9 +408,9 @@ BootstrapMain(int argc, char *argv[])
|
407 | 408 | */
|
408 | 409 | Int_yyparse();
|
409 | 410 |
|
410 |
| -#ifdef XLOG |
411 |
| - FlushBufferPool(); |
412 |
| -#endif |
| 411 | + SetProcessingMode(NormalProcessing); |
| 412 | + CreateCheckPoint(true); |
| 413 | + SetProcessingMode(BootstrapProcessing); |
413 | 414 |
|
414 | 415 | /* clean up processing */
|
415 | 416 | StartTransactionCommand();
|
|
0 commit comments