Skip to content

Commit fa42b20

Browse files
committed
Update comments overlooked by 2f5c9d9.
Tomas Vondra
1 parent 7f31121 commit fa42b20

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 because CatalogUpdateIndexes might not know about all
1862-
* the indexes yet (see reindex_relation).
1861+
* its pg_class row because CatalogTupleInsert/CatalogTupleUpdate might
1862+
* not know about all the 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-
* because CatalogUpdateIndexes 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+
* because CatalogTupleInsert/CatalogTupleUpdate will use the relcache's
3546+
* index list to know which indexes to update. We just force the index
3547+
* list to be only the stuff 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy