Commit 6fb7c5d
committed
Centralize timestamp computation of control file on updates
This commit moves the timestamp computation of the control file within
the routine of src/common/ in charge of updating the backend's control
file, which is shared by multiple frontend tools (pg_rewind,
pg_checksums and pg_resetwal) and the backend itself.
This change has as direct effect to update the control file's timestamp
when writing the control file in pg_rewind and pg_checksums, something
that is helpful to keep track of control file updates for those
operations, something also tracked by the backend at startup within its
logs. This part is arguably a bug, as ControlFileData->time should be
updated each time a new version of the control file is written, but this
is a behavior change so no backpatch is done.
Author: Amul Sul
Reviewed-by: Nathan Bossart, Michael Paquier, Bharath Rupireddy
Discussion: https://postgr.es/m/CAAJ_b97nd_ghRpyFV9Djf9RLXkoTbOUqnocq11WGq9TisX09Fw@mail.gmail.com1 parent 3804539 commit 6fb7c5d
File tree
3 files changed
+5
-8
lines changed- src
- backend/access/transam
- bin/pg_resetwal
- common
3 files changed
+5
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7339 | 7339 | | |
7340 | 7340 | | |
7341 | 7341 | | |
7342 | | - | |
| 7342 | + | |
7343 | 7343 | | |
7344 | 7344 | | |
7345 | 7345 | | |
| |||
8199 | 8199 | | |
8200 | 8200 | | |
8201 | 8201 | | |
8202 | | - | |
8203 | 8202 | | |
8204 | 8203 | | |
8205 | 8204 | | |
| |||
9142 | 9141 | | |
9143 | 9142 | | |
9144 | 9143 | | |
9145 | | - | |
9146 | 9144 | | |
9147 | 9145 | | |
9148 | 9146 | | |
| |||
9412 | 9410 | | |
9413 | 9411 | | |
9414 | 9412 | | |
9415 | | - | |
9416 | 9413 | | |
9417 | 9414 | | |
9418 | 9415 | | |
| |||
9539 | 9536 | | |
9540 | 9537 | | |
9541 | 9538 | | |
9542 | | - | |
9543 | 9539 | | |
9544 | 9540 | | |
9545 | 9541 | | |
| |||
9740 | 9736 | | |
9741 | 9737 | | |
9742 | 9738 | | |
9743 | | - | |
9744 | 9739 | | |
9745 | 9740 | | |
9746 | 9741 | | |
| |||
9801 | 9796 | | |
9802 | 9797 | | |
9803 | 9798 | | |
9804 | | - | |
9805 | 9799 | | |
9806 | 9800 | | |
9807 | 9801 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
911 | 911 | | |
912 | 912 | | |
913 | 913 | | |
914 | | - | |
915 | 914 | | |
916 | 915 | | |
917 | 916 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
171 | 175 | | |
172 | 176 | | |
173 | 177 | | |
| |||
0 commit comments