forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf2bf8fb
committed
Reindex toast before its main relation in reindex_relation()
This commit changes the order of reindex on a relation so as a toastrelation is processed before its main relation.The original order, where a rebuild was first done for the indexes onthe main table, could be a problem in the event of a corruption of atoast index, because, as scans of a toast index may be required torebuild the indexes on the main relation, this could lead to failureswith REINDEX TABLE without being able to fix anything.Rebuilding corrupted toast indexes before this change was possible buttroublesome, as it was necessary to issue a REINDEX on the toastrelation first, followed by a REINDEX on the main relation. Changingthe order of these operations should make things easier when rebuildingcorrupted indexes, as toast indexes would be rebuilt before they areused for the indexes on the main relation.Per request from Richard Vesely.Author: Gurjeet SinghReviewed-by: Nathan Bossart, Michael PaquierDiscussion:https://postgr.es/m/18016-2bd9b549b1fe49b3@postgresql.org1 parentbc397e5 commitf2bf8fb
1 file changed
+31
-21
lines changedLines changed: 31 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3917 | 3917 |
| |
3918 | 3918 |
| |
3919 | 3919 |
| |
3920 |
| - | |
| 3920 | + | |
3921 | 3921 |
| |
3922 | 3922 |
| |
3923 | 3923 |
| |
| |||
3964 | 3964 |
| |
3965 | 3965 |
| |
3966 | 3966 |
| |
| 3967 | + | |
| 3968 | + | |
| 3969 | + | |
| 3970 | + | |
| 3971 | + | |
| 3972 | + | |
| 3973 | + | |
| 3974 | + | |
| 3975 | + | |
| 3976 | + | |
| 3977 | + | |
| 3978 | + | |
| 3979 | + | |
| 3980 | + | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
| 3988 | + | |
| 3989 | + | |
| 3990 | + | |
| 3991 | + | |
| 3992 | + | |
| 3993 | + | |
| 3994 | + | |
| 3995 | + | |
3967 | 3996 |
| |
3968 | 3997 |
| |
3969 | 3998 |
| |
| |||
4017 | 4046 |
| |
4018 | 4047 |
| |
4019 | 4048 |
| |
4020 |
| - | |
4021 |
| - | |
4022 |
| - | |
4023 |
| - | |
4024 |
| - | |
4025 |
| - | |
4026 |
| - | |
4027 |
| - | |
4028 |
| - | |
4029 |
| - | |
4030 |
| - | |
4031 |
| - | |
4032 |
| - | |
4033 |
| - | |
4034 |
| - | |
4035 |
| - | |
4036 |
| - | |
4037 |
| - | |
4038 |
| - | |
4039 |
| - | |
| 4049 | + | |
4040 | 4050 |
| |
4041 | 4051 |
| |
4042 | 4052 |
| |
|
0 commit comments
Comments
(0)