Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfa42b20

Browse files
committed
Update comments overlooked by2f5c9d9.
Tomas Vondra
1 parent7f31121 commitfa42b20

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

‎src/backend/catalog/index.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,8 +1858,8 @@ index_update_stats(Relation rel,
18581858
* 1. In bootstrap mode, we have no choice --- UPDATE wouldn't work.
18591859
*
18601860
* 2. We could be reindexing pg_class itself, in which case we can't move
1861-
* its pg_class row becauseCatalogUpdateIndexes might not know about all
1862-
* the indexes yet (see reindex_relation).
1861+
* its pg_class row becauseCatalogTupleInsert/CatalogTupleUpdate might
1862+
*not know about allthe indexes yet (see reindex_relation).
18631863
*
18641864
* 3. Because we execute CREATE INDEX with just share lock on the parent
18651865
* rel (to allow concurrent index creations), an ordinary update could
@@ -3542,9 +3542,9 @@ reindex_relation(Oid relid, int flags, int options)
35423542
* that the updates do not try to insert index entries into indexes we
35433543
* have not processed yet. (When we are trying to recover from corrupted
35443544
* indexes, that could easily cause a crash.) We can accomplish this
3545-
* becauseCatalogUpdateIndexes will use the relcache's index list to know
3546-
* which indexes to update. We just force the index list to be only the
3547-
* stuff we've processed.
3545+
* becauseCatalogTupleInsert/CatalogTupleUpdate will use the relcache's
3546+
*index list to knowwhich indexes to update. We just force the index
3547+
*list to be only thestuff we've processed.
35483548
*
35493549
* It is okay to not insert entries into the indexes we have not processed
35503550
* yet because all of this is transaction-safe. If we fail partway

‎src/backend/utils/cache/syscache.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,8 @@
100100
adding/deleting caches only requires a recompile.)
101101
102102
Finally, any place your relation gets heap_insert() or
103-
heap_update() calls, make sure there is a CatalogUpdateIndexes() or
104-
similar call. The heap_* calls do not update indexes.
105-
106-
bjm 1999/11/22
103+
heap_update() calls, use CatalogTupleInsert() or CatalogTupleUpdate()
104+
instead, which also update indexes. The heap_* calls do not do that.
107105
108106
*---------------------------------------------------------------------------
109107
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp