even if no recent WAL activity has occurred.
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/access/transam/clog.c,v 1.7 2001/10/28 06:25:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/clog.c,v 1.7.2.1 2002/09/30 19:55:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
if (!ScanCLOGDirectory(cutoffPage, false))
return; /* nothing to remove */
- /* Perform a CHECKPOINT */
- CreateCheckPoint(false);
+ /* Perform a forced CHECKPOINT */
+ CreateCheckPoint(false, true);
/*
* Scan CLOG shared memory and remove any pages preceding the cutoff
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.86.2.1 2002/03/15 19:20:43 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.86.2.2 2002/09/30 19:55:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
* checkpoint to become prevCheckPoint...
*/
ControlFile->checkPoint = checkPointLoc;
- CreateCheckPoint(true);
+ CreateCheckPoint(true, true);
XLogCloseRelationCache();
}
CritSectionCount++;
CreateDummyCaches();
- CreateCheckPoint(true);
+ CreateCheckPoint(true, true);
ShutdownCLOG();
CritSectionCount--;
* Perform a checkpoint --- either during shutdown, or on-the-fly
*/
void
-CreateCheckPoint(bool shutdown)
+CreateCheckPoint(bool shutdown, bool force)
{
CheckPoint checkPoint;
XLogRecPtr recptr;
* match the end of the last checkpoint record, and its redo pointer
* must point to itself.
*/
- if (!shutdown)
+ if (!shutdown && !force)
{
XLogRecPtr curInsert;
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.120.2.1 2002/03/15 19:20:44 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.120.2.2 2002/09/30 19:55:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
if (IsUnderPostmaster)
InitDummyProcess(); /* needed to get LWLocks */
CreateDummyCaches();
- CreateCheckPoint(false);
+ CreateCheckPoint(false, false);
SetSavedRedoRecPtr(); /* pass redo ptr back to postmaster */
proc_exit(0); /* done */
Int_yyparse();
SetProcessingMode(NormalProcessing);
- CreateCheckPoint(true);
+ CreateCheckPoint(true, true);
SetProcessingMode(BootstrapProcessing);
/* clean up processing */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.125.2.1 2002/02/26 23:48:46 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.125.2.2 2002/09/30 19:55:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
{
if (!superuser())
elog(ERROR, "permission denied");
- CreateCheckPoint(false);
+ CreateCheckPoint(false, false);
}
break;
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: xlog.h,v 1.28.2.1 2002/03/15 19:20:47 tgl Exp $
+ * $Id: xlog.h,v 1.28.2.2 2002/09/30 19:55:08 tgl Exp $
*/
#ifndef XLOG_H
#define XLOG_H
extern void BootStrapXLOG(void);
extern void StartupXLOG(void);
extern void ShutdownXLOG(void);
-extern void CreateCheckPoint(bool shutdown);
+extern void CreateCheckPoint(bool shutdown, bool force);
extern void SetThisStartUpID(void);
extern void XLogPutNextOid(Oid nextOid);
extern void SetSavedRedoRecPtr(void);