- Notifications
You must be signed in to change notification settings - Fork5
Commit6f10eb2
committed
Refactor heap_page_prune so that instead of changing item states on-the-fly,
it accumulates the set of changes to be made and then applies them. It hadto accumulate the set of changes anyway to prepare a WAL record for thepruning action, so this isn't an enormous change; the only new complexity isto not doubly mark tuples that are visited twice in the scan. The mainadvantage is that we can substantially reduce the scope of the criticalsection in which the changes are applied, thus avoiding PANIC in foreseeablecases like running out of memory in inval.c. A nice secondary advantage isthat it is now far clearer that WAL replay will actually do the same thingthat the original pruning did.This commit doesn't do anything about the open problem thatCacheInvalidateHeapTuple doesn't have the right semantics for a CTID changecaused by collapsing out a redirect pointer. But whatever we do about that,it'll be a good idea to not do it inside a critical section.1 parentcc05d05 commit6f10eb2
File tree
3 files changed
+294
-197
lines changed- src
- backend/access/heap
- include/access
3 files changed
+294
-197
lines changedLines changed: 19 additions & 54 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
3967 | 3967 |
| |
3968 | 3968 |
| |
3969 | 3969 |
| |
3970 |
| - | |
3971 | 3970 |
| |
| 3971 | + | |
| 3972 | + | |
| 3973 | + | |
3972 | 3974 |
| |
3973 | 3975 |
| |
3974 |
| - | |
| 3976 | + | |
3975 | 3977 |
| |
3976 | 3978 |
| |
3977 | 3979 |
| |
| |||
3990 | 3992 |
| |
3991 | 3993 |
| |
3992 | 3994 |
| |
3993 |
| - | |
3994 | 3995 |
| |
3995 |
| - | |
3996 |
| - | |
3997 |
| - | |
3998 |
| - | |
3999 |
| - | |
4000 |
| - | |
4001 |
| - | |
4002 |
| - | |
4003 |
| - | |
4004 |
| - | |
4005 |
| - | |
4006 |
| - | |
4007 |
| - | |
4008 |
| - | |
4009 |
| - | |
4010 |
| - | |
4011 |
| - | |
4012 |
| - | |
4013 |
| - | |
4014 |
| - | |
4015 |
| - | |
4016 |
| - | |
4017 |
| - | |
4018 |
| - | |
4019 |
| - | |
4020 |
| - | |
4021 |
| - | |
4022 |
| - | |
4023 |
| - | |
4024 |
| - | |
4025 |
| - | |
4026 |
| - | |
4027 |
| - | |
4028 |
| - | |
4029 |
| - | |
4030 |
| - | |
4031 |
| - | |
4032 |
| - | |
4033 |
| - | |
4034 |
| - | |
4035 |
| - | |
4036 |
| - | |
4037 |
| - | |
4038 |
| - | |
4039 |
| - | |
4040 |
| - | |
4041 |
| - | |
| 3996 | + | |
| 3997 | + | |
| 3998 | + | |
| 3999 | + | |
| 4000 | + | |
| 4001 | + | |
| 4002 | + | |
| 4003 | + | |
| 4004 | + | |
| 4005 | + | |
| 4006 | + | |
| 4007 | + | |
4042 | 4008 |
| |
4043 | 4009 |
| |
4044 |
| - | |
4045 |
| - | |
| 4010 | + | |
| 4011 | + | |
4046 | 4012 |
| |
4047 |
| - | |
4048 | 4013 |
| |
4049 | 4014 |
| |
4050 | 4015 |
| |
|
0 commit comments
Comments
(0)