Re: Memory leak of SMgrRelation object on standby
邱宇航 <iamqyh@gmail.com>
From: 邱宇航 <iamqyh@gmail.com>
To: Jingtang Zhang <mrdrivingduck@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>,
pgsql-hackers@lists.postgresql.org
Date: 2025-08-25T02:46:43Z
Lists: pgsql-hackers
> 2025年8月21日 23:07,Jingtang Zhang <mrdrivingduck@gmail.com> 写道: > > Also, in this situation, should startup process be treated as a background > worker similar to bgwriter/checkpointer and call smgrdestroyall in some > period? Agree with that. Maybe we can call smgrdestroyall in startup process when replaying CHECKPOINT records, just like bgwriter/checkpointer, which free all smgr objects after any checkpoint. Best regards, Yuhang Qiu
Commits
-
Fix leak with SMgrRelations in startup process
- e2dd7b2acf27 17.7 landed
- 039301b3fceb 18.0 landed
- 8c8f7b199d90 19 (unreleased) landed
-
Give SMgrRelation pointers a well-defined lifetime.
- 21d9c3ee4ef7 17.0 cited