|
23 | 23 | * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group |
24 | 24 | * Portions Copyright (c) 1994, Regents of the University of California |
25 | 25 | * |
26 | | - * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.79 2010/04/28 16:10:43 heikki Exp $ |
| 26 | + * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.80 2010/04/28 19:38:49 tgl Exp $ |
27 | 27 | * |
28 | 28 | *------------------------------------------------------------------------- |
29 | 29 | */ |
@@ -497,11 +497,19 @@ GuessControlValues(void) |
497 | 497 | ControlFile.checkPointCopy.oldestXid = FirstNormalTransactionId; |
498 | 498 | ControlFile.checkPointCopy.oldestXidDB = InvalidOid; |
499 | 499 | ControlFile.checkPointCopy.time = (pg_time_t) time(NULL); |
| 500 | + ControlFile.checkPointCopy.oldestActiveXid = InvalidTransactionId; |
500 | 501 |
|
501 | 502 | ControlFile.state = DB_SHUTDOWNED; |
502 | 503 | ControlFile.time = (pg_time_t) time(NULL); |
503 | 504 | ControlFile.checkPoint = ControlFile.checkPointCopy.redo; |
504 | 505 |
|
| 506 | + /* minRecoveryPoint and backupStartPoint can be left zero */ |
| 507 | + |
| 508 | + ControlFile.wal_level = WAL_LEVEL_MINIMAL; |
| 509 | + ControlFile.MaxConnections = 100; |
| 510 | + ControlFile.max_prepared_xacts = 0; |
| 511 | + ControlFile.max_locks_per_xact = 64; |
| 512 | + |
505 | 513 | ControlFile.maxAlign = MAXIMUM_ALIGNOF; |
506 | 514 | ControlFile.floatFormat = FLOATFORMAT_VALUE; |
507 | 515 | ControlFile.blcksz = BLCKSZ; |
@@ -574,6 +582,8 @@ PrintControlValues(bool guessed) |
574 | 582 | ControlFile.checkPointCopy.oldestXid); |
575 | 583 | printf(_("Latest checkpoint's oldestXID's DB: %u\n"), |
576 | 584 | ControlFile.checkPointCopy.oldestXidDB); |
| 585 | + printf(_("Latest checkpoint's oldestActiveXID: %u\n"), |
| 586 | + ControlFile.checkPointCopy.oldestActiveXid); |
577 | 587 | printf(_("Maximum data alignment: %u\n"), |
578 | 588 | ControlFile.maxAlign); |
579 | 589 | /* we don't print floatFormat since can't say much useful about it */ |
@@ -629,13 +639,14 @@ RewriteControlFile(void) |
629 | 639 | ControlFile.backupStartPoint.xrecoff = 0; |
630 | 640 |
|
631 | 641 | /* |
632 | | - * Use the defaults for max_* settings. The values don't matter |
633 | | - * as long as wal_level='minimal'. |
| 642 | + * Force the defaults for max_* settings. The values don't really matter |
| 643 | + * as long as wal_level='minimal'; the postmaster will reset these fields |
| 644 | + * anyway at startup. |
634 | 645 | */ |
| 646 | + ControlFile.wal_level = WAL_LEVEL_MINIMAL; |
635 | 647 | ControlFile.MaxConnections = 100; |
636 | 648 | ControlFile.max_prepared_xacts = 0; |
637 | 649 | ControlFile.max_locks_per_xact = 64; |
638 | | - ControlFile.wal_level = WAL_LEVEL_MINIMAL; |
639 | 650 |
|
640 | 651 | /* Now we can force the recorded xlog seg size to the right thing. */ |
641 | 652 | ControlFile.xlog_seg_size = XLogSegSize; |
|
0 commit comments