Re: Memory leak of SMgrRelation object on standby

2025-08-21 Thread Jingtang Zhang
Hi~ > On Sat, Aug 16, 2025 at 12:50 AM Jingtang Zhang > wrote: >> Back to v17, commit 21d9c3ee gave SMgrRelation a well-defined lifetime, and >> smgrclose nolonger removes SMgrRelation object from the hashtable, leaving >> the work to smgrdestroyall. But I find a place that relies on the removin

Re: Memory leak of SMgrRelation object on standby

2025-08-18 Thread Jingtang Zhang
Hi~ Thanks for looking. > DropRelationFiles() is also called by FinishPreparedTransaction(). At > first I thought that might be a problem too, but looking a bit more > closely and trying it out... if a prepared transaction dropped a > table, then it called RelationDropStorage(), RelationCloseSmg

Re: Memory leak of SMgrRelation object on standby

2025-08-17 Thread Thomas Munro
On Sat, Aug 16, 2025 at 12:50 AM Jingtang Zhang wrote: > Back to v17, commit 21d9c3ee gave SMgrRelation a well-defined lifetime, and > smgrclose nolonger removes SMgrRelation object from the hashtable, leaving > the work to smgrdestroyall. But I find a place that relies on the removing > behavior

Memory leak of SMgrRelation object on standby

2025-08-15 Thread Jingtang Zhang
Hi~ hackers Back to v17, commit 21d9c3ee gave SMgrRelation a well-defined lifetime, and smgrclose nolonger removes SMgrRelation object from the hashtable, leaving the work to smgrdestroyall. But I find a place that relies on the removing behavior previously, but is still calling smgrclose. Startu