File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -127,13 +127,7 @@ relation_statistics_update(FunctionCallInfo fcinfo)
127127
128128 ctup = SearchSysCache1 (RELOID , ObjectIdGetDatum (reloid ));
129129 if (!HeapTupleIsValid (ctup ))
130- {
131- ereport (WARNING ,
132- (errcode (ERRCODE_OBJECT_IN_USE ),
133- errmsg ("pg_class entry for relid %u not found" , reloid )));
134- table_close (crel , RowExclusiveLock );
135- return false;
136- }
130+ elog (ERROR , "pg_class entry for relid %u not found" , reloid );
137131
138132 pgcform = (Form_pg_class ) GETSTRUCT (ctup );
139133
Original file line number Diff line number Diff line change @@ -136,12 +136,14 @@ stats_lock_check_privileges(Oid reloid)
136136
137137 /*
138138 * For indexes, we follow the locking behavior in do_analyze_rel() and
139- * check_inplace_rel_lock(), which is to lock the table first in
140- * ShareUpdateExclusive mode and then the index in AccessShare mode.
139+ * check_lock_if_inplace_updateable_rel(), which is to lock the table
140+ * first in ShareUpdateExclusive mode and then the index in AccessShare
141+ * mode.
141142 *
142143 * Partitioned indexes are treated differently than normal indexes in
143- * check_inplace_rel_lock(), so we take a ShareUpdateExclusive lock on
144- * both the partitioned table and the partitioned index.
144+ * check_lock_if_inplace_updateable_rel(), so we take a
145+ * ShareUpdateExclusive lock on both the partitioned table and the
146+ * partitioned index.
145147 */
146148 switch (get_rel_relkind (reloid ))
147149 {
You can’t perform that action at this time.
0 commit comments