- Notifications
You must be signed in to change notification settings - Fork28
Commit52ab02d
committed
Simplify partitioned table creation vs. relcache
In the original code, we were storing the pg_inherits row for apartitioned table too early: enough that we had a hack for relcache toavoid falling flat on its face while reading such a partial entry. Ifwe finish the pg_class creation first and *then* store the pg_inheritsentry, we don't need that hack.Also recognize that pg_class.relpartbound is not marked NOT NULL andtherefore it's entirely possible to read null values, so having onlyAssert() protection isn't enough. Change those to if/elog testsinstead. This qualifies as a robustness fix, so backpatch to pg11.In passing, remove one access that wasn't actually needed, and rewordone message to be like all the others that check for the same thing.Reviewed-by: Amit LangoteDiscussion:https://postgr.es/m/20180903213916.hh6wasnrdg6xv2ud@alvherre.pgsql1 parent838fd62 commit52ab02d
File tree
3 files changed
+9
-25
lines changed- src/backend
- commands
- partitioning
- utils/cache
3 files changed
+9
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | 773 | | |
777 | 774 | | |
778 | 775 | | |
| |||
866 | 863 | | |
867 | 864 | | |
868 | 865 | | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
| |||
14648 | 14648 | | |
14649 | 14649 | | |
14650 | 14650 | | |
14651 | | - | |
14652 | | - | |
14653 | | - | |
14654 | | - | |
14655 | 14651 | | |
14656 | 14652 | | |
14657 | 14653 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1641 | 1641 | | |
1642 | 1642 | | |
1643 | 1643 | | |
| 1644 | + | |
| 1645 | + | |
1644 | 1646 | | |
1645 | | - | |
1646 | 1647 | | |
1647 | 1648 | | |
1648 | 1649 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | 305 | | |
319 | 306 | | |
320 | 307 | | |
321 | | - | |
| 308 | + | |
| 309 | + | |
322 | 310 | | |
323 | 311 | | |
324 | 312 | | |
| |||
883 | 871 | | |
884 | 872 | | |
885 | 873 | | |
886 | | - | |
887 | | - | |
888 | | - | |
| 874 | + | |
| 875 | + | |
889 | 876 | | |
890 | 877 | | |
891 | 878 | | |
| |||
0 commit comments
Comments
(0)