forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit83158f7
committed
Make index_set_state_flags() transactional
3c84046 is the original commit that introduced index_set_state_flags(),where the presence of SnapshotNow made necessary the use of an in-placeupdate. SnapshotNow has been removed in813fb03, so there is no actualreasons to not make this operation transactional.Note that while making the operation more robust, using a transactionaloperation in this routine was not strictly necessary as there was no usecase for it yet. However, some future features are going to need atransactional behavior, like support for CREATE/DROP INDEX CONCURRENTLYwith partitioned tables, where indexes in a partition tree need to haveall their pg_index.indis* flags updated in the same transaction to makethe operation stable to the end-user by keeping partition treesconsistent, even with a failure mid-flight.REINDEX CONCURRENTLY uses already transactional updates when swappingthe old and new indexes, making this change more consistent with theindex-swapping logic.Author: Michael PaquierReviewed-by: Anastasia LubennikovaDiscussion:https://postgr.es/m/20200903080440.GA8559@paquier.xyz1 parent3e0242b commit83158f7
1 file changed
+4
-15
lines changedLines changed: 4 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3311 | 3311 |
| |
3312 | 3312 |
| |
3313 | 3313 |
| |
3314 |
| - | |
3315 |
| - | |
3316 |
| - | |
3317 |
| - | |
| 3314 | + | |
3318 | 3315 |
| |
3319 |
| - | |
| 3316 | + | |
3320 | 3317 |
| |
3321 |
| - | |
3322 |
| - | |
3323 |
| - | |
3324 |
| - | |
3325 |
| - | |
3326 | 3318 |
| |
3327 | 3319 |
| |
3328 | 3320 |
| |
| |||
3331 | 3323 |
| |
3332 | 3324 |
| |
3333 | 3325 |
| |
3334 |
| - | |
3335 |
| - | |
3336 |
| - | |
3337 | 3326 |
| |
3338 | 3327 |
| |
3339 | 3328 |
| |
| |||
3397 | 3386 |
| |
3398 | 3387 |
| |
3399 | 3388 |
| |
3400 |
| - | |
3401 |
| - | |
| 3389 | + | |
| 3390 | + | |
3402 | 3391 |
| |
3403 | 3392 |
| |
3404 | 3393 |
| |
|
0 commit comments
Comments
(0)