File tree 2 files changed +7
-11
lines changed
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)
127
127
128
128
ctup = SearchSysCache1 (RELOID , ObjectIdGetDatum (reloid ));
129
129
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 );
137
131
138
132
pgcform = (Form_pg_class ) GETSTRUCT (ctup );
139
133
Original file line number Diff line number Diff line change @@ -136,12 +136,14 @@ stats_lock_check_privileges(Oid reloid)
136
136
137
137
/*
138
138
* 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.
141
142
*
142
143
* 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.
145
147
*/
146
148
switch (get_rel_relkind (reloid ))
147
149
{
You can’t perform that action at this time.
0 commit comments