Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7c298c6

Browse files
committed
Add comment about extract_autovac_opts not holding lock
Per observation from Tom Lane. Discussion: https://postgr.es/m/1901125.1617904665@sss.pgh.pa.us
1 parent 7b357cc commit 7c298c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/backend/postmaster/autovacuum.c

+5
Original file line numberDiff line numberDiff line change
@@ -2783,6 +2783,11 @@ perform_work_item(AutoVacuumWorkItem *workitem)
27832783
*
27842784
* Given a relation's pg_class tuple, return the AutoVacOpts portion of
27852785
* reloptions, if set; otherwise, return NULL.
2786+
*
2787+
* Note: callers do not have a relation lock on the table at this point,
2788+
* so the table could have been dropped, and its catalog rows gone, after
2789+
* we acquired the pg_class row. If pg_class had a TOAST table, this would
2790+
* be a risk; fortunately, it doesn't.
27862791
*/
27872792
static AutoVacOpts *
27882793
extract_autovac_opts(HeapTuple tup, TupleDesc pg_class_desc)

0 commit comments

Comments
 (0)