forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commiteca1388
committed
Fix corner-case bug introduced with HOT: if REINDEX TABLE pg_class (or a
REINDEX DATABASE including same) is done before a session has done any otherupdate on pg_class, the pg_class relcache entry was left with an incorrectsetting of rd_indexattr, because the indexed-attributes set would be firstdemanded at a time when we'd forced a partial list of indexes into thepg_class entry, and it would remain cached after that. This could resultin incorrect decisions about HOT-update safety later in the same session.In practice, since only pg_class_relname_nsp_index would be missed out,only ALTER TABLE RENAME and ALTER TABLE SET SCHEMA could trigger a problem.Per report and test case from Ondrej Jirman.1 parent30fd8ec commiteca1388
2 files changed
+14
-4
lines changedLines changed: 6 additions & 2 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 |
| |
| |||
2380 | 2380 |
| |
2381 | 2381 |
| |
2382 | 2382 |
| |
2383 |
| - | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
2384 | 2387 |
| |
2385 | 2388 |
| |
| 2389 | + | |
2386 | 2390 |
| |
2387 | 2391 |
| |
2388 | 2392 |
| |
|
Lines changed: 8 additions & 2 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 |
| |
| |||
2986 | 2986 |
| |
2987 | 2987 |
| |
2988 | 2988 |
| |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
2989 | 2996 |
| |
2990 | 2997 |
| |
2991 | 2998 |
| |
| |||
3004 | 3011 |
| |
3005 | 3012 |
| |
3006 | 3013 |
| |
3007 |
| - | |
3008 | 3014 |
| |
3009 | 3015 |
| |
3010 | 3016 |
| |
|
0 commit comments
Comments
(0)