Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
3047b444
Commit
3047b444
authored
Nov 21, 1999
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up comments.
parent
d8ba3dfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
20 deletions
+14
-20
src/include/storage/buf_internals.h
src/include/storage/buf_internals.h
+14
-20
No files found.
src/include/storage/buf_internals.h
View file @
3047b444
/*-------------------------------------------------------------------------
*
* buf_internals.h
* Internal definitions.
* Internal definitions
for buffer manager
.
*
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: buf_internals.h,v 1.33 1999/09/24 00:25:27 tgl Exp $
*
* NOTE
* If BUFFERPAGE0 is defined, then 0 will be used as a
* valid buffer page number.
* $Id: buf_internals.h,v 1.34 1999/11/21 19:56:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -42,18 +38,14 @@ extern int Num_Descriptors;
typedef
bits16
BufFlags
;
typedef
struct
sbufdesc
BufferDesc
;
typedef
struct
sbufdesc
BufferHdr
;
typedef
struct
buftag
BufferTag
;
/* long * so alignment will be correct */
typedef
long
**
BufferBlock
;
struct
buftag
typedef
struct
buftag
{
LockRelId
relId
;
BlockNumber
blockNum
;
/* blknum relative to begin of reln */
};
}
BufferTag
;
#define CLEAR_BUFFERTAG(a) \
( \
...
...
@@ -72,8 +64,8 @@ struct buftag
#define INVALID_DESCRIPTOR (-3)
/*
*
struct sbufd
esc -- shared buffer cache metadata for a single
*
shared buffer descriptor.
*
BufferD
esc -- shared buffer cache metadata for a single
* shared buffer descriptor.
*
* We keep the name of the database and relation in which this
* buffer appears in order to avoid a catalog lookup on cache
...
...
@@ -83,9 +75,9 @@ struct buftag
* Dbname, relname, dbid, and relid are enough to determine where
* to put the buffer, for all storage managers.
*/
struct
sbufdesc
typedef
struct
sbufdesc
{
Buffer
freeNext
;
/* link for freelist chain */
Buffer
freeNext
;
/* link
s
for freelist chain */
Buffer
freePrev
;
SHMEM_OFFSET
data
;
/* pointer to data in buf pool */
...
...
@@ -93,7 +85,7 @@ struct sbufdesc
BufferTag
tag
;
/* file/block identifier */
int
buf_id
;
/* maps global desc to local desc */
BufFlags
flags
;
/*
described below
*/
BufFlags
flags
;
/*
see bit definitions above
*/
unsigned
refcount
;
/* # of times buffer is pinned */
#ifdef HAS_TEST_AND_SET
...
...
@@ -107,10 +99,12 @@ struct sbufdesc
char
sb_dbname
[
NAMEDATALEN
];
/* name of db in which buf belongs */
char
sb_relname
[
NAMEDATALEN
];
/* name of reln */
};
}
BufferDesc
;
/*
* Buffer lock infos in BufferLocks below.
* Each backend has its own BufferLocks[] array holding flag bits
* showing what locks it has set on each buffer.
*
* We have to free these locks in elog(ERROR)...
*/
#define BL_IO_IN_PROGRESS (1 << 0)
/* unimplemented */
...
...
@@ -178,7 +172,7 @@ extern BufferDesc *LocalBufferDescriptors;
extern
int
NLocBuffer
;
extern
BufferDesc
*
LocalBufferAlloc
(
Relation
reln
,
BlockNumber
blockNum
,
bool
*
foundPtr
);
bool
*
foundPtr
);
extern
int
WriteLocalBuffer
(
Buffer
buffer
,
bool
release
);
extern
int
FlushLocalBuffer
(
Buffer
buffer
,
bool
release
);
extern
void
InitLocalBuffer
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment