Change _mdfd_segpath() to return paths by value
Andres Freund <andres@anarazel.de>
Change _mdfd_segpath() to return paths by value This basically mirrors the changes done in the predecessor commit. While there isn't currently a need to get these paths in critical sections, it seems a shame to unnecessarily allocate memory in these paths now that relpath() doesn't allocate anymore. Discussion: https://postgr.es/m/xeri5mla4b5syjd5a25nok5iez2kr3bm26j2qn4u7okzof2bmf@kwdh2vf7npra
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/smgr/md.c | modified | +37 −21 |
| src/tools/pgindent/typedefs.list | modified | +1 −0 |
Discussion
- GetRelationPath() vs critical sections 18 messages · 2024-09-04 → 2025-02-25