forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit811203d
committed
Fix data-corruption hazard in WAL-logged CREATE DATABASE.
RelationCopyStorageUsingBuffer thought it could skip copyingempty pages, but of course that does not work at all, becausesubsequent blocks will be out of place.Also fix it to acquire share lock on the source buffer. It *might*be safe to not do that, but it's not very certain, and I don't thinkthis code deserves any benefit of the doubt.Dilip Kumar, per complaint from meDiscussion:https://postgr.es/m/3679800.1659654066@sss.pgh.pa.us1 parent6390bc7 commit811203d
1 file changed
+3
-7
lines changedLines changed: 3 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3742 | 3742 |
| |
3743 | 3743 |
| |
3744 | 3744 |
| |
| 3745 | + | |
3745 | 3746 |
| |
3746 |
| - | |
3747 |
| - | |
3748 |
| - | |
3749 |
| - | |
3750 |
| - | |
3751 | 3747 |
| |
3752 | 3748 |
| |
3753 | 3749 |
| |
3754 | 3750 |
| |
3755 | 3751 |
| |
3756 | 3752 |
| |
| 3753 | + | |
3757 | 3754 |
| |
3758 | 3755 |
| |
3759 | 3756 |
| |
3760 | 3757 |
| |
3761 |
| - | |
3762 | 3758 |
| |
3763 | 3759 |
| |
3764 | 3760 |
| |
| |||
3769 | 3765 |
| |
3770 | 3766 |
| |
3771 | 3767 |
| |
3772 |
| - | |
| 3768 | + | |
3773 | 3769 |
| |
3774 | 3770 |
| |
3775 | 3771 |
| |
|
0 commit comments
Comments
(0)