forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7d70809
committed
Refactor creation of backup_label and backup history files
This change simplifies some of the logic related to the generation andcreation of the backup_label and backup history files, which has becomeunnecessarily complicated since the removal of the exclusive backup modein commit 39969e2. The code was previously generating the contents ofthese files as a string (start phase for the backup_label and stop phasefor the backup history file), one problem being that the contents of thebackup_label string were scanned to grab some of its internal contentsat the stop phase.This commit changes the logic so as we store the data required to buildthese files in an intermediate structure named BackupState. Thebackup_label file and backup history file strings are generated whenthey are ready to be sent back to the client. Both files are nowgenerated with the same code path. While on it, this commit renamessome variables for clarity.Two new files named xlogbackup.{c,h} are introduced in this commit, toremove from xlog.c some of the logic around base backups. Note thatmore could be moved to this new set of files.Author: Bharath Rupireddy, Michael PaquierReviewed-by: Fujii MasaoDiscussion:https://postgr.es/m/CALj2ACXWwTDgJqCjdaPyfR7djwm6SrybGcrZyrvojzcsmt4FFw@mail.gmail.com1 parent216f9c1 commit7d70809
File tree
9 files changed
+292
-202
lines changed- src
- backend
- access/transam
- backup
- include/access
- tools/pgindent
9 files changed
+292
-202
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
|
0 commit comments
Comments
(0)