Skip to content

Commit 2e63581

Browse files
committed
I had to change buffer tag: now RelFileNode is used instead of
LockRelId - ie physical information, not logical. It's required for WAL. Regression tests passed.
1 parent 8b6b414 commit 2e63581

File tree

6 files changed

+156
-243
lines changed

6 files changed

+156
-243
lines changed

src/backend/storage/buffer/buf_init.c

Lines changed: 5 additions & 3 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.35 2000/05/31 00:28:26 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.36 2000/10/18 05:50:15 vadim Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -67,8 +67,9 @@ long *PrivateRefCount; /* also used in freelist.c */
6767
bits8 *BufferLocks; /* flag bits showing locks I have set */
6868
BufferTag *BufferTagLastDirtied; /* tag buffer had when last
6969
* dirtied by me */
70-
BufferBlindId *BufferBlindLastDirtied; /* and its BlindId too */
71-
bool *BufferDirtiedByMe; /* T if buf has been dirtied in cur xact */
70+
BufferBlindId *BufferBlindLastDirtied;
71+
LockRelId *BufferRelidLastDirtied;
72+
bool *BufferDirtiedByMe; /* T if buf has been dirtied in cur xact */
7273

7374

7475
/*
@@ -251,6 +252,7 @@ InitBufferPool(IPCKey key)
251252
BufferLocks = (bits8 *) calloc(NBuffers, sizeof(bits8));
252253
BufferTagLastDirtied = (BufferTag *) calloc(NBuffers, sizeof(BufferTag));
253254
BufferBlindLastDirtied = (BufferBlindId *) calloc(NBuffers, sizeof(BufferBlindId));
255+
BufferRelidLastDirtied = (LockRelId *) calloc(NBuffers, sizeof(LockRelId));
254256
BufferDirtiedByMe = (bool *) calloc(NBuffers, sizeof(bool));
255257
}
256258

src/backend/storage/buffer/buf_table.c

Lines changed: 3 additions & 3 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_table.c,v 1.17 2000/05/19 03:22:28 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.18 2000/10/18 05:50:15 vadim Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -125,8 +125,8 @@ BufTableDelete(BufferDesc *buf)
125125
* sequential searches through the buffer table won't think the
126126
* buffer is still valid for its old page.
127127
*/
128-
buf->tag.relId.relId = InvalidOid;
129-
buf->tag.relId.dbId = InvalidOid;
128+
buf->tag.rnode.relNode = InvalidOid;
129+
buf->tag.rnode.tblNode = InvalidOid;
130130

131131
return TRUE;
132132
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy