PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
g
h
i
k
l
m
p
r
s
t
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
c
d
f
h
i
n
o
p
r
s
t
~
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
method_sync.c
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* method_sync.c
4
* AIO - perform "AIO" by executing it synchronously
5
*
6
* This method is mainly to check if AIO use causes regressions. Other IO
7
* methods might also fall back to the synchronous method for functionality
8
* they cannot provide.
9
*
10
* Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
11
* Portions Copyright (c) 1994, Regents of the University of California
12
*
13
* IDENTIFICATION
14
* src/backend/storage/aio/method_sync.c
15
*
16
*-------------------------------------------------------------------------
17
*/
18
19
#include "
postgres.h
"
20
21
#include "
storage/aio.h
"
22
#include "
storage/aio_internal.h
"
23
24
static
bool
pgaio_sync_needs_synchronous_execution
(
PgAioHandle
*ioh);
25
static
int
pgaio_sync_submit
(
uint16
num_staged_ios,
PgAioHandle
**staged_ios);
26
27
28
const
IoMethodOps
pgaio_sync_ops
= {
29
.
needs_synchronous_execution
=
pgaio_sync_needs_synchronous_execution
,
30
.submit =
pgaio_sync_submit
,
31
};
32
33
34
35
static
bool
36
pgaio_sync_needs_synchronous_execution
(
PgAioHandle
*ioh)
37
{
38
return
true
;
39
}
40
41
static
int
42
pgaio_sync_submit
(
uint16
num_staged_ios,
PgAioHandle
**staged_ios)
43
{
44
elog
(
ERROR
,
"IO should have been executed synchronously"
);
45
46
return
0;
47
}
aio.h
aio_internal.h
uint16
uint16_t uint16
Definition:
c.h:501
ERROR
#define ERROR
Definition:
elog.h:39
elog
#define elog(elevel,...)
Definition:
elog.h:225
pgaio_sync_ops
const IoMethodOps pgaio_sync_ops
Definition:
method_sync.c:28
pgaio_sync_submit
static int pgaio_sync_submit(uint16 num_staged_ios, PgAioHandle **staged_ios)
Definition:
method_sync.c:42
pgaio_sync_needs_synchronous_execution
static bool pgaio_sync_needs_synchronous_execution(PgAioHandle *ioh)
Definition:
method_sync.c:36
postgres.h
IoMethodOps
Definition:
aio_internal.h:250
IoMethodOps::needs_synchronous_execution
bool(* needs_synchronous_execution)(PgAioHandle *ioh)
Definition:
aio_internal.h:283
PgAioHandle
Definition:
aio_internal.h:92
src
backend
storage
aio
method_sync.c
Generated on Thu Mar 27 2025 06:13:21 for PostgreSQL Source Code by
1.9.4