aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorVadim B. Mikheev <vadim4o@yahoo.com>2000-11-21 09:39:57 +0000
committerVadim B. Mikheev <vadim4o@yahoo.com>2000-11-21 09:39:57 +0000
commite8ff221d8b137c0e9a4242a24a19599f02b56ff7 (patch)
treec4aa9eacd44d1bac1c1ef3b54237364b4e5a8020 /src/backend/access/transam/xlog.c
parentb31e83f461f8b1470058eed7cb9f3488da5d5cca (diff)
downloadpostgresql-e8ff221d8b137c0e9a4242a24a19599f02b56ff7.tar.gz
postgresql-e8ff221d8b137c0e9a4242a24a19599f02b56ff7.zip
Fix OID bootstraping.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 22f93190f70..6d6d8edbda5 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.29 2000/11/21 02:11:06 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.30 2000/11/21 09:39:56 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@@ -251,7 +251,7 @@ XLogInsert(RmgrId rmid, uint8 info, char *hdr, uint32 hdrlen, char *buf, uint32
if (len == 0 || len > MAXLOGRECSZ)
elog(STOP, "XLogInsert: invalid record len %u", len);
- if (IsBootstrapProcessingMode())
+ if (IsBootstrapProcessingMode() && rmid != RM_XLOG_ID)
{
RecPtr.xlogid = 0;
RecPtr.xrecoff = SizeOfXLogPHD; /* start of 1st checkpoint record */
@@ -506,7 +506,7 @@ XLogFlush(XLogRecPtr record)
fflush(stderr);
}
- if (IsBootstrapProcessingMode() || InRedo)
+ if (InRedo)
return;
if (XLByteLE(record, LgwrResult.Flush))
return;
@@ -1326,8 +1326,7 @@ BootStrapXLOG()
#endif
- memset(buffer, 0, BLCKSZ);
- ControlFile = (ControlFileData *) buffer;
+ memset(ControlFile, 0, BLCKSZ);
ControlFile->logId = 0;
ControlFile->logSeg = 1;
ControlFile->checkPoint = checkPoint.redo;
@@ -1337,7 +1336,7 @@ BootStrapXLOG()
ControlFile->relseg_size = RELSEG_SIZE;
ControlFile->catalog_version_no = CATALOG_VERSION_NO;
- if (write(fd, buffer, BLCKSZ) != BLCKSZ)
+ if (write(fd, ControlFile, BLCKSZ) != BLCKSZ)
elog(STOP, "BootStrapXLOG failed to write control file: %d", errno);
if (fsync(fd) != 0)