forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd4b3440
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 parentcb31e2a commitd4b3440
1 file changed
+3
-7
lines changedLines changed: 3 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3741 | 3741 |
| |
3742 | 3742 |
| |
3743 | 3743 |
| |
| 3744 | + | |
3744 | 3745 |
| |
3745 |
| - | |
3746 |
| - | |
3747 |
| - | |
3748 |
| - | |
3749 |
| - | |
3750 | 3746 |
| |
3751 | 3747 |
| |
3752 | 3748 |
| |
3753 | 3749 |
| |
3754 | 3750 |
| |
3755 | 3751 |
| |
| 3752 | + | |
3756 | 3753 |
| |
3757 | 3754 |
| |
3758 | 3755 |
| |
3759 | 3756 |
| |
3760 |
| - | |
3761 | 3757 |
| |
3762 | 3758 |
| |
3763 | 3759 |
| |
| |||
3768 | 3764 |
| |
3769 | 3765 |
| |
3770 | 3766 |
| |
3771 |
| - | |
| 3767 | + | |
3772 | 3768 |
| |
3773 | 3769 |
| |
3774 | 3770 |
| |
|
0 commit comments
Comments
(0)