Commit 83eb540
committed
Fix two bugs in setting the vm bit of empty pages.
Use a critical section when setting the all-visible flag on an empty page,
and WAL-logging it. log_newpage_buffer() contains an assertion that it
must be called inside a critical section, and it's the right thing to do
when modifying a buffer anyway.
Also, the page should be marked dirty before calling log_newpage_buffer(),
per the comment in log_newpage_buffer() and src/backend/access/transam/README.
Patch by Andres Freund, in response to my report. Backpatch to 9.2, like
the patch that introduced these bugs (a6370fd).1 parent 5f1ab46 commit 83eb540
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
666 | 671 | | |
667 | 672 | | |
668 | 673 | | |
| |||
682 | 687 | | |
683 | 688 | | |
684 | 689 | | |
685 | | - | |
686 | 690 | | |
687 | 691 | | |
| 692 | + | |
688 | 693 | | |
689 | 694 | | |
690 | 695 | | |
| |||
0 commit comments