Hi~
> I purpose a patch which calls smgrdestroyall() when redo each
> XLOG_CHECKPOINT_ONLINE, so that it can keep the same frequency of calling
> smgrdestroyall() as background processes on primary. I don't call it for
> XLOG_CHECKPOINT_SHUTDOWN because the process is about to exit so that the
> m
Hi~
> 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.
That seems reasonable, in that case a startup process would behave just the
same as bgwriter or chec
> 2025年8月21日 23:07,Jingtang Zhang 写道:
>
> 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
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
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
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
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