Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3fea625

Browse files
committed
Make tree compilable (+WAL).
1 parent539b630 commit3fea625

File tree

7 files changed

+29
-26
lines changed

7 files changed

+29
-26
lines changed

‎src/backend/access/transam/xact.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.53 1999/09/24 00:24:05 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.54 1999/09/28 11:41:03 vadim Exp $
1111
*
1212
* NOTES
1313
*Transaction aborts can now occur two ways:
@@ -632,7 +632,7 @@ RecordTransactionCommit()
632632
*/
633633
if (SharedBufferChanged)
634634
{
635-
FlushBufferPool(!TransactionFlushEnabled());
635+
FlushBufferPool();
636636
if (leak)
637637
ResetBufferPool();
638638

@@ -646,7 +646,7 @@ RecordTransactionCommit()
646646
*Now write the log info to the disk too.
647647
*/
648648
leak=BufferPoolCheckLeak();
649-
FlushBufferPool(!TransactionFlushEnabled());
649+
FlushBufferPool();
650650
}
651651

652652
if (leak)

‎src/backend/access/transam/xlog.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include<unistd.h>
33
#include<errno.h>
44
#include<sys/stat.h>
5+
#include<sys/time.h>
56

67
#include"postgres.h"
78
#include"access/xlog.h"
@@ -1376,12 +1377,10 @@ CreateCheckPoint(bool shutdown)
13761377
/* Get REDO record ptr */
13771378
while (!TAS(&(XLogCtl->insert_lck)))
13781379
{
1379-
structtimevaldelay;
1380+
structtimevaldelay= {0,5000};
13801381

13811382
if (shutdown)
13821383
elog(STOP,"XLog insert lock is busy while data base is shutting down");
1383-
delay.tv_sec=0;
1384-
delay.tv_usec=0;
13851384
(void)select(0,NULL,NULL,NULL,&delay);
13861385
}
13871386
freespace= ((char*)Insert->currpage)+BLCKSZ-Insert->currpos;
@@ -1408,7 +1407,7 @@ CreateCheckPoint(bool shutdown)
14081407
checkPoint.nextOid=ShmemVariableCache->nextOid;
14091408
SpinRelease(OidGenLockId);
14101409

1411-
FlushBufferPool(false);
1410+
FlushBufferPool();
14121411

14131412
/* Get UNDO record ptr */
14141413

‎src/backend/commands/vacuum.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.121 1999/09/24 00:24:17 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.122 1999/09/28 11:41:04 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1703,9 +1703,9 @@ failed to add item with len = %u to page %u (free space %u, nusd %u, noff %u)",
17031703
* flush buffers and record status of current transaction as
17041704
* committed, and continue. - vadim 11/13/96
17051705
*/
1706-
FlushBufferPool(!TransactionFlushEnabled());
1706+
FlushBufferPool();
17071707
TransactionIdCommit(myXID);
1708-
FlushBufferPool(!TransactionFlushEnabled());
1708+
FlushBufferPool();
17091709
}
17101710

17111711
/*
@@ -1899,12 +1899,10 @@ vc_vacheap(VRelStats *vacrelstats, Relation onerel, VPageList vacuum_pages)
18991899
vacrelstats->num_pages,nblocks);
19001900

19011901
/*
1902-
* we have to flush "empty" end-pages (if changed, but who knows
1903-
* it) before truncation
1904-
*
1905-
* XXX wouldn't passing 'true' to FlushRelationBuffers do the job?
1902+
* We have to flush "empty" end-pages (if changed, but who knows it)
1903+
* before truncation
19061904
*/
1907-
FlushBufferPool(!TransactionFlushEnabled());
1905+
FlushBufferPool();
19081906

19091907
i=FlushRelationBuffers(onerel,nblocks, false);
19101908
if (i<0)

‎src/backend/storage/buffer/bufmgr.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.63 1999/09/24 00:24:29 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.64 1999/09/28 11:41:06 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1240,13 +1240,10 @@ relname=%s, blockNum=%d, flags=0x%x, refcount=%d %d)",
12401240
* ------------------------------------------------
12411241
*/
12421242
void
1243-
FlushBufferPool(intStableMainMemoryFlag)
1243+
FlushBufferPool(void)
12441244
{
1245-
if (!StableMainMemoryFlag)
1246-
{
1247-
BufferSync();
1248-
smgrcommit();
1249-
}
1245+
BufferSync();
1246+
smgrcommit();
12501247
}
12511248

12521249
/*

‎src/backend/storage/smgr/md.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.54 1999/09/24 00:24:47 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.55 1999/09/28 11:41:07 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -815,6 +815,12 @@ mdtruncate(Relation reln, int nblocks)
815815
int
816816
mdcommit()
817817
{
818+
#ifdefXLOG
819+
sync();
820+
sleep(1);
821+
sync();
822+
returnSM_SUCCESS;
823+
#else
818824
inti;
819825
MdfdVec*v;
820826

@@ -838,6 +844,7 @@ mdcommit()
838844
}
839845

840846
returnSM_SUCCESS;
847+
#endif/* XLOG */
841848
}
842849

843850
/*

‎src/backend/utils/init/postinit.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.49 1999/09/24 00:24:58 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.50 1999/09/28 11:41:09 vadim Exp $
1111
*
1212
* NOTES
1313
*InitPostgres() is the function called from PostgresMain
@@ -541,8 +541,10 @@ InitPostgres(char *name)/* database name */
541541
*/
542542
InitLocalBuffer();
543543

544+
#ifndefXLOG
544545
if (!TransactionFlushEnabled())
545546
on_shmem_exit(FlushBufferPool, (caddr_t)NULL);
547+
#endif
546548

547549
/* ----------------
548550
*initialize the database id used for system caches and lock tables

‎src/include/storage/bufmgr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: bufmgr.h,v 1.31 1999/09/24 00:25:27 tgl Exp $
9+
* $Id: bufmgr.h,v 1.32 1999/09/28 11:40:53 vadim Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -170,7 +170,7 @@ extern void PrintBufferUsage(FILE *statfp);
170170
externvoidResetBufferUsage(void);
171171
externvoidResetBufferPool(void);
172172
externintBufferPoolCheckLeak(void);
173-
externvoidFlushBufferPool(intStableMainMemoryFlag);
173+
externvoidFlushBufferPool(void);
174174
externBlockNumberBufferGetBlockNumber(Bufferbuffer);
175175
externBlockNumberRelationGetNumberOfBlocks(Relationrelation);
176176
externintFlushRelationBuffers(Relationrel,BlockNumberblock,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp