pgstat: replace double lookup with IsSharedRelation()
Andres Freund <andres@anarazel.de>
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" <bertranddrouvot.pg@gmail.com> Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de Discussion: https://postgr.es/m/8c1851a2-a98e-e1bc-7729-37b0b95f66ec@gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/activity/pgstat_relation.c | modified | +2 −11 |
Discussion
- Avoid double lookup in pgstat_fetch_stat_tabentry() 7 messages · 2022-11-18 → 2022-11-20