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
This commit is contained in:
Alvaro Herrera 2021-04-21 18:36:12 -04:00
parent 7b357cc6ae
commit 7c298c6573
No known key found for this signature in database
GPG Key ID: 1C20ACB9D5C564AE
1 changed files with 5 additions and 0 deletions

View File

@ -2783,6 +2783,11 @@ deleted2:
*
* Given a relation's pg_class tuple, return the AutoVacOpts portion of
* reloptions, if set; otherwise, return NULL.
*
* Note: callers do not have a relation lock on the table at this point,
* so the table could have been dropped, and its catalog rows gone, after
* we acquired the pg_class row. If pg_class had a TOAST table, this would
* be a risk; fortunately, it doesn't.
*/
static AutoVacOpts *
extract_autovac_opts(HeapTuple tup, TupleDesc pg_class_desc)