Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
3047b444
Commit
3047b444
authored
25 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Clean up comments.
parent
d8ba3dfb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/include/storage/buf_internals.h
+14
-20
14 additions, 20 deletions
src/include/storage/buf_internals.h
with
14 additions
and
20 deletions
src/include/storage/buf_internals.h
+
14
−
20
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment