diff options
Diffstat (limited to 'src/backend/utils/adt/dbsize.c')
-rw-r--r-- | src/backend/utils/adt/dbsize.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c index 68ab0e19061..8c663379ae7 100644 --- a/src/backend/utils/adt/dbsize.c +++ b/src/backend/utils/adt/dbsize.c @@ -358,6 +358,7 @@ calculate_toast_table_size(Oid toastrelid) foreach(lc, indexlist) { Relation toastIdxRel; + toastIdxRel = relation_open(lfirst_oid(lc), AccessShareLock); for (forkNum = 0; forkNum <= MAX_FORKNUM; forkNum++) @@ -689,7 +690,7 @@ pg_size_pretty_numeric(PG_FUNCTION_ARGS) * This is expected to be used in queries like * SELECT pg_relation_filenode(oid) FROM pg_class; * That leads to a couple of choices. We work from the pg_class row alone - * rather than actually opening each relation, for efficiency. We don't + * rather than actually opening each relation, for efficiency. We don't * fail if we can't find the relation --- some rows might be visible in * the query's MVCC snapshot even though the relations have been dropped. * (Note: we could avoid using the catcache, but there's little point |