forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0dc8ead
committed
Refactor WAL file-reading code into WALRead()
XLogReader, walsender and pg_waldump all had their own routines to readdata from WAL files to memory, with slightly different approachesaccording to the particular conditions of each environment. There's alot of commonality, so we can refactor that into a single routineWALRead in XLogReader, and move the differences to a separate (simpler)callback that just opens the next WAL-segment. This results in aclearer (ahem) code flow.The error reporting needs are covered by filling in a new error-infostruct, WALReadError, and it's the caller's responsibility to act on it.The backend has WALReadRaiseError() to do so.We no longer ever need to seek in this interface; switch to usingpg_pread().Author: Antonin Houska, with contributions from Álvaro HerreraReviewed-by: Michaël Paquier, Kyotaro HoriguchiDiscussion:https://postgr.es/m/14984.1554998742@spoje.net1 parent5883f5f commit0dc8ead
File tree
6 files changed
+387
-433
lines changed- src
- backend
- access/transam
- replication
- bin/pg_waldump
- include/access
6 files changed
+387
-433
lines changedLines changed: 100 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
| 21 | + | |
20 | 22 |
| |
21 | 23 |
| |
22 | 24 |
| |
| |||
27 | 29 |
| |
28 | 30 |
| |
29 | 31 |
| |
| 32 | + | |
30 | 33 |
| |
31 | 34 |
| |
32 | 35 |
| |
| |||
208 | 211 |
| |
209 | 212 |
| |
210 | 213 |
| |
211 |
| - | |
212 | 214 |
| |
213 | 215 |
| |
214 | 216 |
| |
| |||
295 | 297 |
| |
296 | 298 |
| |
297 | 299 |
| |
298 |
| - | |
299 |
| - | |
| 300 | + | |
300 | 301 |
| |
301 | 302 |
| |
302 | 303 |
| |
| |||
556 | 557 |
| |
557 | 558 |
| |
558 | 559 |
| |
559 |
| - | |
| 560 | + | |
560 | 561 |
| |
561 | 562 |
| |
562 | 563 |
| |
| |||
627 | 628 |
| |
628 | 629 |
| |
629 | 630 |
| |
630 |
| - | |
| 631 | + | |
631 | 632 |
| |
632 | 633 |
| |
633 | 634 |
| |
| |||
644 | 645 |
| |
645 | 646 |
| |
646 | 647 |
| |
647 |
| - | |
| 648 | + | |
648 | 649 |
| |
649 | 650 |
| |
650 | 651 |
| |
| |||
1015 | 1016 |
| |
1016 | 1017 |
| |
1017 | 1018 |
| |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
1018 | 1112 |
| |
1019 | 1113 |
| |
1020 | 1114 |
| |
|
0 commit comments
Comments
(0)