Commit 8ef9451
committed
Refactor cluster.c to use new routine get_index_isclustered()
This new cache lookup routine has been introduced in a40caf5, and more
code paths can directly use it.
Note that in cluster_rel(), the code was returning immediately if the
tuple's entry in pg_index for the clustered index was not valid. This
commit changes the code so as a lookup error is raised instead,
something that could not happen from the start as we check for the
existence of the index beforehand, while holding an exclusive lock on
the parent table.
Author: Justin Pryzby
Reviewed-by: Álvaro Herrera, Michael Paquier
Discussion: https://postgr.es/m/20200202161718.GI13621@telsasoft.com1 parent 33e05f8 commit 8ef9451
1 file changed
+3
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 142 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 143 | + | |
154 | 144 | | |
155 | | - | |
156 | | - | |
157 | 145 | | |
158 | 146 | | |
159 | 147 | | |
| |||
304 | 292 | | |
305 | 293 | | |
306 | 294 | | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | 295 | | |
311 | 296 | | |
312 | 297 | | |
| |||
345 | 330 | | |
346 | 331 | | |
347 | 332 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
| 333 | + | |
357 | 334 | | |
358 | | - | |
359 | 335 | | |
360 | 336 | | |
361 | 337 | | |
362 | 338 | | |
363 | | - | |
364 | 339 | | |
365 | 340 | | |
366 | 341 | | |
| |||
519 | 494 | | |
520 | 495 | | |
521 | 496 | | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
| 497 | + | |
530 | 498 | | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | 499 | | |
535 | 500 | | |
536 | 501 | | |
| |||
0 commit comments