- Notifications
You must be signed in to change notification settings - Fork28
Commit9727c58
committed
Restructure CLUSTER/newstyle VACUUM FULL/ALTER TABLE support so that swapping
of old and new toast tables can be done either at the logical level (byswapping the heaps' reltoastrelid links) or at the physical level (by swappingthe relfilenodes of the toast tables and their indexes). This is necessaryinfrastructure for upcoming changes to support CLUSTER/VAC FULL on sharedsystem catalogs, where we cannot change reltoastrelid. The physical swapsaves a few catalog updates too.We unfortunately have to keep the logical-level swap logic because in somecases we will be adding or deleting a toast table, so there's no possibilityof a physical swap. However, that only happens as a consequence of schemachanges in the table, which we do not need to support for system catalogs,so such cases aren't an obstacle for that.In passing, refactor the cluster support functions a little bit to eliminateunnecessarily-duplicated code; and fix the problem that while CLUSTER hadbeen taught to rename the final toast table at need, ALTER TABLE had not.1 parentfdac8cf commit9727c58
File tree
6 files changed
+328
-212
lines changed- src
- backend
- access/heap
- commands
- utils/cache
- include
- commands
- utils
6 files changed
+328
-212
lines changedLines changed: 17 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 |
| |
| |||
1185 | 1185 |
| |
1186 | 1186 |
| |
1187 | 1187 |
| |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
1188 | 1204 |
| |
1189 | 1205 |
| |
1190 | 1206 |
| |
1191 |
| - | |
1192 | 1207 |
| |
1193 | 1208 |
| |
1194 | 1209 |
| |
|
0 commit comments
Comments
(0)