mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
New CHECKPOINT command.
Auto removing of offline log files and creating new file at checkpoint time.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.79 2000/10/29 18:33:41 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.80 2000/11/05 22:50:19 vadim Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Transaction aborts can now occur two ways:
|
||||
@ -678,7 +678,7 @@ RecordTransactionCommit()
|
||||
leak = BufferPoolCheckLeak();
|
||||
|
||||
#ifdef XLOG
|
||||
if (MyLastRecPtr.xlogid != 0 || MyLastRecPtr.xrecoff != 0)
|
||||
if (MyLastRecPtr.xrecoff != 0)
|
||||
{
|
||||
xl_xact_commit xlrec;
|
||||
struct timeval delay;
|
||||
@ -701,7 +701,6 @@ RecordTransactionCommit()
|
||||
delay.tv_usec = CommitDelay;
|
||||
(void) select(0, NULL, NULL, NULL, &delay);
|
||||
XLogFlush(recptr);
|
||||
MyLastRecPtr.xlogid = 0;
|
||||
MyLastRecPtr.xrecoff = 0;
|
||||
|
||||
TransactionIdCommit(xid);
|
||||
@ -836,7 +835,7 @@ RecordTransactionAbort(void)
|
||||
TransactionIdAbort(xid);
|
||||
|
||||
#ifdef XLOG
|
||||
if (MyLastRecPtr.xlogid != 0 || MyLastRecPtr.xrecoff != 0)
|
||||
if (MyLastRecPtr.xrecoff != 0)
|
||||
{
|
||||
xl_xact_abort xlrec;
|
||||
XLogRecPtr recptr;
|
||||
@ -844,6 +843,8 @@ RecordTransactionAbort(void)
|
||||
xlrec.xtime = time(NULL);
|
||||
recptr = XLogInsert(RM_XACT_ID, XLOG_XACT_ABORT,
|
||||
(char*) &xlrec, SizeOfXactAbort, NULL, 0);
|
||||
|
||||
MyProc->logRec.xrecoff = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1189,7 +1190,6 @@ AbortTransaction(void)
|
||||
AtEOXact_Files();
|
||||
|
||||
/* Here we'll rollback xaction changes */
|
||||
MyLastRecPtr.xlogid = 0;
|
||||
MyLastRecPtr.xrecoff = 0;
|
||||
|
||||
AtAbort_Locks();
|
||||
|
Reference in New Issue
Block a user