forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit756e221
committed
Reduce overhead of renaming archive status files.
Presently, archive status files are durably renamed from .ready to.done to indicate that a file has been archived. Persisting thisrename to disk accounts for a significant amount of the overheadassociated with archiving. While durably renaming the fileprevents re-archiving in most cases, archive commands and librariesmust already gracefully handle attempts to re-archive the lastarchived file after a crash (e.g., a crash immediately afterarchive_command exits but before the server renames the statusfile).This change reduces the amount of overhead associated witharchiving by using rename() instead of durable_rename() to renamethe archive status files. As a consequence, the server is morelikely to attempt to re-archive files after a crash, but as notedabove, archive commands and modules are already expected to handlethis. It is also possible that the server will attempt to re-archive files that have been removed or recycled, but the archiveralready handles this, too.Author: Nathan BossartReviewed-by: Kyotaro Horiguchi, Fujii MasaoDiscussion:https://postgr.es/m/20220222011948.GA3850532@nathanxps131 parent27e0ee5 commit756e221
1 file changed
+13
-1
lines changedLines changed: 13 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
745 | 745 |
| |
746 | 746 |
| |
747 | 747 |
| |
748 |
| - | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
749 | 761 |
| |
750 | 762 |
| |
751 | 763 |
| |
|
0 commit comments
Comments
(0)