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

Commit918e864

Browse files
committed
Remove some pre-WAL relics:
SharedBufferChanged BufferRelidLastDirtied BufferTagLastDirtied BufferDirtiedByMeManfred Koizar
1 parent3c35fac commit918e864

File tree

4 files changed

+6
-37
lines changed

4 files changed

+6
-37
lines changed

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

Lines changed: 1 addition & 7 deletions
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.126 2002/06/11 13:40:50 wieck Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.127 2002/06/15 19:55:37 momjian Exp $
1212
*
1313
* NOTES
1414
*Transaction aborts can now occur two ways:
@@ -182,8 +182,6 @@
182182
#include"pgstat.h"
183183

184184

185-
externboolSharedBufferChanged;
186-
187185
staticvoidAbortTransaction(void);
188186
staticvoidAtAbort_Cache(void);
189187
staticvoidAtAbort_Locks(void);
@@ -991,8 +989,6 @@ CommitTransaction(void)
991989
AtCommit_Memory();
992990
AtEOXact_Files();
993991

994-
SharedBufferChanged= false;/* safest place to do it */
995-
996992
/* Count transaction commit in statistics collector */
997993
pgstat_count_xact_commit();
998994

@@ -1094,8 +1090,6 @@ AbortTransaction(void)
10941090
AtEOXact_Files();
10951091
AtAbort_Locks();
10961092

1097-
SharedBufferChanged= false;/* safest place to do it */
1098-
10991093
/* Count transaction abort in statistics collector */
11001094
pgstat_count_xact_rollback();
11011095

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.47 2001/11/05 17:46:27 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.48 2002/06/15 19:55:37 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -60,9 +60,6 @@ Block *BufferBlockPointers;
6060

6161
long*PrivateRefCount;/* also used in freelist.c */
6262
bits8*BufferLocks;/* flag bits showing locks I have set */
63-
BufferTag*BufferTagLastDirtied;/* tag buffer had when last
64-
* dirtied by me */
65-
bool*BufferDirtiedByMe;/* T if buf has been dirtied in cur xact */
6663

6764

6865
/*
@@ -235,9 +232,6 @@ InitBufferPoolAccess(void)
235232
BufferBlockPointers= (Block*)calloc(NBuffers,sizeof(Block));
236233
PrivateRefCount= (long*)calloc(NBuffers,sizeof(long));
237234
BufferLocks= (bits8*)calloc(NBuffers,sizeof(bits8));
238-
BufferTagLastDirtied= (BufferTag*)calloc(NBuffers,sizeof(BufferTag));
239-
BufferDirtiedByMe= (bool*)calloc(NBuffers,sizeof(bool));
240-
241235
/*
242236
* Convert shmem offsets into addresses as seen by this process. This
243237
* is just to speed up the BufferGetBlock() macro.

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

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.123 2002/04/1523:47:12 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.124 2002/06/1519:55:37 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -67,15 +67,6 @@ extern long int LocalBufferHitCount;
6767
externlongintBufferFlushCount;
6868
externlongintLocalBufferFlushCount;
6969

70-
/*
71-
* It's used to avoid disk writes for read-only transactions
72-
* (i.e. when no one shared buffer was changed by transaction).
73-
* We set it to true in WriteBuffer/WriteNoReleaseBuffer when
74-
* marking shared buffer as dirty. We set it to false in xact.c
75-
* after transaction is committed/aborted.
76-
*/
77-
boolSharedBufferChanged= false;
78-
7970
staticvoidWaitIO(BufferDesc*buf);
8071
staticvoidStartBufferIO(BufferDesc*buf,boolforInput);
8172
staticvoidTerminateBufferIO(BufferDesc*buf);
@@ -593,8 +584,6 @@ WriteBuffer(Buffer buffer)
593584

594585
bufHdr=&BufferDescriptors[buffer-1];
595586

596-
SharedBufferChanged= true;
597-
598587
LWLockAcquire(BufMgrLock,LW_EXCLUSIVE);
599588
Assert(bufHdr->refcount>0);
600589

@@ -623,8 +612,6 @@ WriteNoReleaseBuffer(Buffer buffer)
623612

624613
bufHdr=&BufferDescriptors[buffer-1];
625614

626-
SharedBufferChanged= true;
627-
628615
LWLockAcquire(BufMgrLock,LW_EXCLUSIVE);
629616
Assert(bufHdr->refcount>0);
630617

@@ -1901,12 +1888,9 @@ _bm_die(Oid dbId, Oid relId, int blkNo, int bufNo,
19011888
*
19021889
*Mark a buffer dirty when we have updated tuple commit-status bits in it.
19031890
*
1904-
* This is similar to WriteNoReleaseBuffer, except that we do not set
1905-
* SharedBufferChanged or BufferDirtiedByMe, because we have not made a
1891+
* This is similar to WriteNoReleaseBuffer, except that we have not made a
19061892
* critical change that has to be flushed to disk before xact commit --- the
1907-
* status-bit update could be redone by someone else just as easily. The
1908-
* buffer will be marked dirty, but it will not be written to disk until
1909-
* there is another reason to write it.
1893+
* status-bit update could be redone by someone else just as easily.
19101894
*
19111895
* This routine might get called many times on the same page, if we are making
19121896
* the first scan after commit of an xact that added/deleted many tuples.

‎src/include/storage/buf_internals.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: buf_internals.h,v 1.54 2001/11/05 17:46:35 momjian Exp $
10+
* $Id: buf_internals.h,v 1.55 2002/06/15 19:55:38 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -170,9 +170,6 @@ extern bool BufTableInsert(BufferDesc *buf);
170170
/* bufmgr.c */
171171
externBufferDesc*BufferDescriptors;
172172
externbits8*BufferLocks;
173-
externBufferTag*BufferTagLastDirtied;
174-
externLockRelId*BufferRelidLastDirtied;
175-
externbool*BufferDirtiedByMe;
176173

177174
/* localbuf.c */
178175
externBufferDesc*LocalBufferDescriptors;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp