PostgreSQL Source Code
git master
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
f
h
i
n
o
p
r
s
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
hio.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* hio.h
4
* POSTGRES heap access method input/output definitions.
5
*
6
*
7
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8
* Portions Copyright (c) 1994, Regents of the University of California
9
*
10
* src/include/access/hio.h
11
*
12
*-------------------------------------------------------------------------
13
*/
14
#ifndef HIO_H
15
#define HIO_H
16
17
#include "
access/htup.h
"
18
#include "
storage/buf.h
"
19
#include "
utils/relcache.h
"
20
21
/*
22
* state for bulk inserts --- private to heapam.c and hio.c
23
*
24
* If current_buf isn't InvalidBuffer, then we are holding an extra pin
25
* on that buffer.
26
*
27
* "typedef struct BulkInsertStateData *BulkInsertState" is in heapam.h
28
*/
29
typedef
struct
BulkInsertStateData
30
{
31
BufferAccessStrategy
strategy
;
/* our BULKWRITE strategy object */
32
Buffer
current_buf
;
/* current insertion target page */
33
34
/*
35
* State for bulk extensions.
36
*
37
* last_free..next_free are further pages that were unused at the time of
38
* the last extension. They might be in use by the time we use them
39
* though, so rechecks are needed.
40
*
41
* XXX: Eventually these should probably live in RelationData instead,
42
* alongside targetblock.
43
*
44
* already_extended_by is the number of pages that this bulk inserted
45
* extended by. If we already extended by a significant number of pages,
46
* we can be more aggressive about extending going forward.
47
*/
48
BlockNumber
next_free
;
49
BlockNumber
last_free
;
50
uint32
already_extended_by
;
51
}
BulkInsertStateData
;
52
53
54
extern
void
RelationPutHeapTuple
(
Relation
relation,
Buffer
buffer,
55
HeapTuple
tuple,
bool
token
);
56
extern
Buffer
RelationGetBufferForTuple
(
Relation
relation,
Size
len
,
57
Buffer
otherBuffer,
int
options
,
58
BulkInsertStateData
*bistate,
59
Buffer
*vmbuffer,
Buffer
*vmbuffer_other,
60
int
num_pages);
61
62
#endif
/* HIO_H */
BlockNumber
uint32 BlockNumber
Definition:
block.h:31
buf.h
Buffer
int Buffer
Definition:
buf.h:23
uint32
unsigned int uint32
Definition:
c.h:492
Size
size_t Size
Definition:
c.h:584
RelationGetBufferForTuple
Buffer RelationGetBufferForTuple(Relation relation, Size len, Buffer otherBuffer, int options, BulkInsertStateData *bistate, Buffer *vmbuffer, Buffer *vmbuffer_other, int num_pages)
RelationPutHeapTuple
void RelationPutHeapTuple(Relation relation, Buffer buffer, HeapTuple tuple, bool token)
Definition:
hio.c:35
BulkInsertStateData
struct BulkInsertStateData BulkInsertStateData
htup.h
token
#define token
Definition:
indent_globs.h:126
len
const void size_t len
Definition:
pg_crc32c_sse42.c:25
relcache.h
BufferAccessStrategyData
Definition:
freelist.c:73
BulkInsertStateData
Definition:
hio.h:30
BulkInsertStateData::last_free
BlockNumber last_free
Definition:
hio.h:49
BulkInsertStateData::strategy
BufferAccessStrategy strategy
Definition:
hio.h:31
BulkInsertStateData::already_extended_by
uint32 already_extended_by
Definition:
hio.h:50
BulkInsertStateData::next_free
BlockNumber next_free
Definition:
hio.h:48
BulkInsertStateData::current_buf
Buffer current_buf
Definition:
hio.h:32
HeapTupleData
Definition:
htup.h:63
RelationData
Definition:
rel.h:56
options
Definition:
oid2name.c:30
src
include
access
hio.h
Generated on Tue Dec 3 2024 00:13:24 for PostgreSQL Source Code by
1.9.1