pgstat: replace double lookup with IsSharedRelation()

As the list of shared relations is fixed, we can just dispatch based
IsSharedRelation(), instead of first trying to look up stats for a non-shared
rel and falling back to shared stats.

Author: "Drouvot, Bertrand" <[email protected]>
Reviewed-by: Bharath Rupireddy <[email protected]>
Reviewed-by: Andres Freund <[email protected]
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/061bf98fb8f468b9a8c9fb617bb30136db1cc812

Modified Files
--------------
src/backend/utils/activity/pgstat_relation.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)

Reply via email to