- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitb64c585
committed
Fix assertion failure in pg_prewarm() on objects without storage.
An assertion test added in commit049ef33 could fail when pg_prewarm()was called on objects without storage, such as partitioned tables.This resulted in the following failure in assert-enabled builds: Failed Assert("RelFileNumberIsValid(rlocator.relNumber)")Note that, in non-assert builds, pg_prewarm() just failed with an errorin that case, so there was no ill effect in practice.This commit fixes the issue by having pg_prewarm() raise an error earlyif the specified object has no storage. This approach is similar tothe fix in commit4623d71 for pg_freespacemap.Back-patched to v17, where the issue was introduced.Author: Masahiro Ikeda <ikedamsh@oss.nttdata.com>Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>Reviewed-by: Richard Guo <guofenglinux@gmail.com>Reviewed-by: Fujii Masao <masao.fujii@gmail.com>Discussion:https://postgr.es/m/e082e6027610fd0a4091ae6d033aa117@oss.nttdata.comBackpatch-through: 171 parent290e8ab commitb64c585
File tree
5 files changed
+35
-0
lines changed- contrib/pg_prewarm
- expected
- sql
5 files changed
+35
-0
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| 13 | + | |
| 14 | + | |
13 | 15 |
| |
14 | 16 |
| |
15 | 17 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + |
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 |
| |
33 | 38 |
| |
34 | 39 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
131 | 139 |
| |
132 | 140 |
| |
133 | 141 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + |
0 commit comments
Comments
(0)