Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f0e37a8

Browse files
committed
New CHECKPOINT command.
Auto removing of offline log files and creating new file at checkpoint time.
1 parent 7267fdd commit f0e37a8

File tree

11 files changed

+274
-39
lines changed

11 files changed

+274
-39
lines changed

src/backend/access/transam/xact.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.79 2000/10/29 18:33:41 vadim Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.80 2000/11/05 22:50:19 vadim Exp $
1212
*
1313
* NOTES
1414
* Transaction aborts can now occur two ways:
@@ -678,7 +678,7 @@ RecordTransactionCommit()
678678
leak = BufferPoolCheckLeak();
679679

680680
#ifdef XLOG
681-
if (MyLastRecPtr.xlogid != 0 || MyLastRecPtr.xrecoff != 0)
681+
if (MyLastRecPtr.xrecoff != 0)
682682
{
683683
xl_xact_commit xlrec;
684684
struct timeval delay;
@@ -701,7 +701,6 @@ RecordTransactionCommit()
701701
delay.tv_usec = CommitDelay;
702702
(void) select(0, NULL, NULL, NULL, &delay);
703703
XLogFlush(recptr);
704-
MyLastRecPtr.xlogid = 0;
705704
MyLastRecPtr.xrecoff = 0;
706705

707706
TransactionIdCommit(xid);
@@ -836,14 +835,16 @@ RecordTransactionAbort(void)
836835
TransactionIdAbort(xid);
837836

838837
#ifdef XLOG
839-
if (MyLastRecPtr.xlogid != 0 || MyLastRecPtr.xrecoff != 0)
838+
if (MyLastRecPtr.xrecoff != 0)
840839
{
841840
xl_xact_abort xlrec;
842841
XLogRecPtr recptr;
843842

844843
xlrec.xtime = time(NULL);
845844
recptr = XLogInsert(RM_XACT_ID, XLOG_XACT_ABORT,
846845
(char*) &xlrec, SizeOfXactAbort, NULL, 0);
846+
847+
MyProc->logRec.xrecoff = 0;
847848
}
848849
#endif
849850

@@ -1189,7 +1190,6 @@ AbortTransaction(void)
11891190
AtEOXact_Files();
11901191

11911192
/* Here we'll rollback xaction changes */
1192-
MyLastRecPtr.xlogid = 0;
11931193
MyLastRecPtr.xrecoff = 0;
11941194

11951195
AtAbort_Locks();

0 commit comments

Comments
 (0)